1
0
mirror of https://github.com/taigrr/log-socket synced 2026-03-20 19:32:25 -07:00

logger => log

This commit is contained in:
2021-08-23 21:12:21 -07:00
parent f51ec53a89
commit 63ed3a2ad7
5 changed files with 6 additions and 6 deletions

31
log/types.go Normal file
View File

@@ -0,0 +1,31 @@
package log
import "time"
type LogWriter chan Entry
type Level int
const (
LTrace Level = iota
LDebug
LInfo
LNotice
LWarn
LError
LPanic
LFatal
)
type Client struct {
LogLevel Level `json:"level"`
writer LogWriter
initialized bool
}
type Entry struct {
Timestamp time.Time `json:"timestamp"`
Output string `json:"output"`
File string `json:"file"`
Level string `json:"level"`
level Level
}