mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-19 09:02:39 +08:00
logx
This commit is contained in:
@ -1,11 +1,18 @@
|
||||
package logx
|
||||
|
||||
var std = NewLogrus()
|
||||
var std = defaultLogger()
|
||||
|
||||
func StandardLogger() Logger {
|
||||
return std
|
||||
}
|
||||
|
||||
func defaultLogger() Logger {
|
||||
return NewLogrus(
|
||||
WithOptions(LogrusOptions{Level: "Debug"}),
|
||||
WithOutput(LogrusOutputOptions{}),
|
||||
WithFormatter(NewNestedFormatter(NestedFormatterOption{Color: true})))
|
||||
}
|
||||
|
||||
// Fields type, used to pass to `WithFields`.
|
||||
type Fields map[string]any
|
||||
|
||||
|
Reference in New Issue
Block a user