package
1.0.2
Repository: https://github.com/guozhaoxin/go-tools.git
Documentation: pkg.go.dev

# README

this package is used to record logger. copy the config.template.toml to your workdir, change the default value to what you want, and pass it the log.Init function to init the logger parameter.

this package only supports 4 log level,from debug to error.

how to use

firstly, you should call Init() to initialize the log object:

err := log.Init(your config file path)

this function may fail if your config file is invalid, so receive the return value and check.

secondly, you can call different level function to record your log:

log.Error("something wrong","pleasse check")
log.Infof("info is %d",100)

if you want to change level,you can call SetLevel():

log.SetLevel(log.ErrorLevel)
fmt.Println(log.GetLevel())
fmt.Println(log.GetLevelStr())

if you want to flush all buffered logs, call Flush():

log.Flush()

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author