20 lines
249 B
Go
20 lines
249 B
Go
package logging
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Record struct {
|
|
Timestamp time.Time
|
|
Level Level
|
|
Message string
|
|
}
|
|
|
|
func NewRecord(l Level, m string) (r *Record) {
|
|
r = &Record{
|
|
Level: l,
|
|
Message: m,
|
|
Timestamp: time.Now(),
|
|
}
|
|
return
|
|
}
|