Documentation
¶
Index ¶
- func Assert(format string, v ...any)
- func Debug(format string, v ...any)
- func Error(format string, v ...any)
- func Info(format string, v ...any)
- func InitLog(logLevel string, timeFmt string, colored bool, appName string, ...)
- func SetGlobalLevel(strLevel string)
- func Warn(format string, v ...any)
- type FileLevelWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLog ¶ added in v0.7.0
func InitLog(logLevel string, timeFmt string, colored bool, appName string, splitEnable bool, splitSize int64, logDir string, history int)
InitLog create a root logger. it will write to console and multiple file by level. note: default set root logger level is info it provides custom log with CustomizeFiles,if it match any caller's name ,log's level will be setting debug and output
func SetGlobalLevel ¶ added in v0.7.0
func SetGlobalLevel(strLevel string)
SetGlobalLevel sets the global override for log level. If this values is raised, all Loggers will use at least this value.
To globally disable logs, set zerolog.GlobalLevel to Disabled.
Types ¶
type FileLevelWriter ¶ added in v0.9.0
func (*FileLevelWriter) WriteLevel ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.