Documentation ¶
Index ¶
- Constants
- func Close() error
- func Crit(args ...interface{})
- func Critf(args ...interface{})
- func Debug(args ...interface{})
- func Debugf(args ...interface{})
- func Error(args ...interface{})
- func Errorf(args ...interface{})
- func Info(args ...interface{})
- func Infof(args ...interface{})
- func Log(args ...interface{})
- func SetGlobalLog(opt LogOption, format ...LogFormat)
- func SetGlobalLogWithLog(logger log.Logger, levelConf ...level.Option)
- func Warn(args ...interface{})
- func Warnf(args ...interface{})
- func WrapLogLevel(levelsSets []string) []level.Option
- type KitLogger
- type LogFormat
- type LogOption
- type LogWriter
Constants ¶
View Source
const ( JsonFormat LogFormat = "json" FmtFormat = "fmt" NoFormat = "no" )
View Source
const (
// CallerNum = 1
CallerNum = 5
)
Variables ¶
This section is empty.
Functions ¶
func SetGlobalLog ¶
SetGlobalLog is not thread saftly
func SetGlobalLogWithLog ¶
SetGlobalLogWithLog set global logger with args logger
func WrapLogLevel ¶
Types ¶
type LogOption ¶
type LogOption struct { // unit in minutes SegmentationThreshold int `toml:"threshold"` LogDir string `toml:"log_dir"` LogName string `toml:"log_name"` LogLevel string `toml:"log_level"` Sync bool `toml:"sync"` }
LogOption log option
type LogWriter ¶
func NewLogWriter ¶
Click to show internal directories.
Click to hide internal directories.