Documentation
¶
Overview ¶
Package's name is intended as "log" as remainder to user to use log level than normal one.
Index ¶
- Constants
- Variables
- func Debug(msg string) error
- func DebugKV(msg string, kv map[string]interface{}) error
- func Debugf(msg string, args ...interface{}) error
- func Error(msg string) error
- func ErrorKV(msg string, kv map[string]interface{}) error
- func Errorf(msg string, args ...interface{}) error
- func Fatal(msg string) error
- func FatalKV(msg string, kv map[string]interface{}) error
- func Fatalf(msg string, args ...interface{}) error
- func Info(msg string) error
- func InfoKV(msg string, kv map[string]interface{}) error
- func Infof(msg string, args ...interface{}) error
- func NewGlobal(v Vendor, conf Config) error
- func Panic(msg string) error
- func PanicKV(msg string, kv map[string]interface{}) error
- func Panicf(msg string, args ...interface{}) error
- func Trace(msg string) error
- func TraceKV(msg string, kv map[string]interface{}) error
- func Tracef(msg string, args ...interface{}) error
- func Warn(msg string) error
- func WarnKV(msg string, kv map[string]interface{}) error
- func Warnf(msg string, args ...interface{}) error
- type Config
- type Log
- type LogLevel
- type Vendor
- type Zerolog
- func (lg *Zerolog) Debug(msg string) error
- func (lg *Zerolog) DebugKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Debugf(msg string, args ...interface{}) error
- func (lg *Zerolog) Error(msg string) error
- func (lg *Zerolog) ErrorKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Errorf(msg string, args ...interface{}) error
- func (lg *Zerolog) Fatal(msg string) error
- func (lg *Zerolog) FatalKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Fatalf(msg string, args ...interface{}) error
- func (lg *Zerolog) Info(msg string) error
- func (lg *Zerolog) InfoKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Infof(msg string, args ...interface{}) error
- func (lg *Zerolog) Panic(msg string) error
- func (lg *Zerolog) PanicKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Panicf(msg string, args ...interface{}) error
- func (lg *Zerolog) Trace(msg string) error
- func (lg *Zerolog) TraceKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Tracef(msg string, args ...interface{}) error
- func (lg *Zerolog) Warn(msg string) error
- func (lg *Zerolog) WarnKV(msg string, kv map[string]interface{}) error
- func (lg *Zerolog) Warnf(msg string, args ...interface{}) error
Constants ¶
View Source
const ( // Vendors ZEROLOG Vendor = "zerolog" // Support DEF_CALLER_SKIP int = 3 )
Variables ¶
View Source
var ( ERR_INVALID_VENDOR = errors.New("invalid vendor") ERR_MISSING_CONFIG = errors.New("config is missing") )
Errors
Functions ¶
Types ¶
type Config ¶
type Config struct {
Zerolog *Zerolog
// contains filtered or unexported fields
}
Config provides list of log's vendor that can be used. It will prioritize from top to bottom and only choose one.
type Log ¶
type Log interface {
Panic(msg string) error
Panicf(msg string, args ...interface{}) error
PanicKV(msg string, kv map[string]interface{}) error
Fatal(msg string) error
Fatalf(msg string, args ...interface{}) error
FatalKV(msg string, kv map[string]interface{}) error
Error(msg string) error
Errorf(msg string, args ...interface{}) error
ErrorKV(msg string, kv map[string]interface{}) error
Warn(msg string) error
Warnf(msg string, args ...interface{}) error
WarnKV(msg string, kv map[string]interface{}) error
Info(msg string) error
Infof(msg string, args ...interface{}) error
InfoKV(msg string, kv map[string]interface{}) error
Debug(msg string) error
Debugf(msg string, args ...interface{}) error
DebugKV(msg string, kv map[string]interface{}) error
Trace(msg string) error
Tracef(msg string, args ...interface{}) error
TraceKV(msg string, kv map[string]interface{}) error
}
Log provides list of standard's log functions.
type LogLevel ¶
type LogLevel int
const ( ZLOG_PANIC LogLevel = LogLevel(zerolog.PanicLevel) ZLOG_FATAL LogLevel = LogLevel(zerolog.FatalLevel) ZLOG_ERROR LogLevel = LogLevel(zerolog.ErrorLevel) ZLOG_WARN LogLevel = LogLevel(zerolog.WarnLevel) ZLOG_INFO LogLevel = LogLevel(zerolog.InfoLevel) ZLOG_DEBUG LogLevel = LogLevel(zerolog.DebugLevel) ZLOG_TRACE LogLevel = LogLevel(zerolog.TraceLevel) )
type Zerolog ¶
type Zerolog struct {
LogLevel LogLevel
UseColor bool
TimeFormat string
// contains filtered or unexported fields
}
Zerolog is config for zerolog's log.
Click to show internal directories.
Click to hide internal directories.