mirror of
https://github.com/taigrr/log-socket
synced 2026-03-21 00:12:19 -07:00
upgrade deps, readme
This commit is contained in:
38
log/types.go
38
log/types.go
@@ -2,9 +2,6 @@ package log
|
||||
|
||||
import "time"
|
||||
|
||||
type LogWriter chan Entry
|
||||
type Level int
|
||||
|
||||
const (
|
||||
LTrace Level = iota
|
||||
LDebug
|
||||
@@ -16,20 +13,23 @@ const (
|
||||
LFatal
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
LogLevel Level `json:"level"`
|
||||
writer LogWriter
|
||||
initialized bool
|
||||
}
|
||||
type (
|
||||
LogWriter chan Entry
|
||||
Level int
|
||||
|
||||
type Entry struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Output string `json:"output"`
|
||||
File string `json:"file"`
|
||||
Level string `json:"level"`
|
||||
level Level
|
||||
}
|
||||
|
||||
type Logger struct {
|
||||
FileInfoDepth int
|
||||
}
|
||||
Client struct {
|
||||
LogLevel Level `json:"level"`
|
||||
writer LogWriter
|
||||
initialized bool
|
||||
}
|
||||
Entry struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Output string `json:"output"`
|
||||
File string `json:"file"`
|
||||
Level string `json:"level"`
|
||||
level Level
|
||||
}
|
||||
Logger struct {
|
||||
FileInfoDepth int
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user