1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-19 09:02:39 +08:00
This commit is contained in:
2022-04-22 14:32:29 +08:00
parent efc8210d97
commit f7df1f1668
10 changed files with 276 additions and 82 deletions

View File

@ -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