Documentation ¶
Index ¶
- Variables
- func Debug(msg string, keyvals ...interface{})
- func Error(msg string, keyvals ...interface{})
- func Fatal(msg string, keyvals ...interface{})
- func Info(msg string, keyvals ...interface{})
- func InitGlobalLogger(conf *Config)
- func Panic(msg string, keyvals ...interface{})
- func Trace(msg string, keyvals ...interface{})
- func Warn(msg string, keyvals ...interface{})
- type Config
- type ShortStringer
- type SubLogger
- func (sl *SubLogger) Debug(msg string, keyvals ...interface{})
- func (sl *SubLogger) Error(msg string, keyvals ...interface{})
- func (sl *SubLogger) Fatal(msg string, keyvals ...interface{})
- func (sl *SubLogger) Info(msg string, keyvals ...interface{})
- func (sl *SubLogger) Panic(msg string, keyvals ...interface{})
- func (sl *SubLogger) SetObj(obj fmt.Stringer)
- func (sl *SubLogger) Trace(msg string, keyvals ...interface{})
- func (sl *SubLogger) Warn(msg string, keyvals ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogFilename = "pactus.log" MaxLogSize = 10 // 10MB to rotate a log file )
Functions ¶
func InitGlobalLogger ¶ added in v0.15.0
func InitGlobalLogger(conf *Config)
Types ¶
type Config ¶
type Config struct { Colorful bool `toml:"colorful"` MaxBackups int `toml:"max_backups"` RotateLogAfterDays int `toml:"rotate_log_after_days"` Compress bool `toml:"compress"` Targets []string `toml:"targets"` Levels map[string]string `toml:"levels"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) BasicCheck ¶ added in v0.15.0
BasicCheck performs basic checks on the configuration.
type ShortStringer ¶ added in v0.15.0
type ShortStringer interface {
ShortString() string
}
type SubLogger ¶ added in v0.15.0
type SubLogger struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.