Documentation ¶
Index ¶
- type LogFields
- type LogLevel
- type Logger
- type LoggerConfig
- type ZeroLogger
- func (logger *ZeroLogger) Debug(message string)
- func (logger *ZeroLogger) Debugf(format string, values ...interface{})
- func (logger *ZeroLogger) Error(message string)
- func (logger *ZeroLogger) Errorf(format string, values ...interface{})
- func (logger *ZeroLogger) GetLogLevel() LogLevel
- func (logger *ZeroLogger) Info(message string)
- func (logger *ZeroLogger) Infof(format string, values ...interface{})
- func (logger *ZeroLogger) Panic(message string)
- func (logger *ZeroLogger) Panicf(format string, values ...interface{})
- func (logger *ZeroLogger) SetLogLevel(level LogLevel)
- func (logger *ZeroLogger) WithFields(fields LogFields) Logger
- func (logger *ZeroLogger) WithInterface(key string, value interface{}) Logger
- func (logger *ZeroLogger) WithPrefix(prefix string) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { SetLogLevel(level LogLevel) GetLogLevel() LogLevel Panic(message string) Panicf(format string, values ...interface{}) Error(message string) Errorf(format string, values ...interface{}) Info(message string) Infof(format string, values ...interface{}) Debug(message string) Debugf(format string, values ...interface{}) WithInterface(key string, value interface{}) Logger WithFields(fields LogFields) Logger WithPrefix(prefix string) Logger }
type LoggerConfig ¶
type LoggerConfig struct { LogPath string `json:"LogPath"` Level int8 `json:"Level"` Color bool `json:"Color"` }
func DefaultConfig ¶
func DefaultConfig() LoggerConfig
func (LoggerConfig) IsValid ¶
func (cfg LoggerConfig) IsValid() (bool, error)
type ZeroLogger ¶
type ZeroLogger struct {
// contains filtered or unexported fields
}
ZeroLogger implements Logger interface and provide logging service using zerolog.
func NewZeroLogger ¶
func NewZeroLogger(logFile string, prefix ...string) *ZeroLogger
func NewZeroLoggerWithColor ¶
func NewZeroLoggerWithColor(logFile string, prefix ...string) *ZeroLogger
func (*ZeroLogger) Debug ¶
func (logger *ZeroLogger) Debug(message string)
func (*ZeroLogger) Debugf ¶
func (logger *ZeroLogger) Debugf(format string, values ...interface{})
func (*ZeroLogger) Error ¶
func (logger *ZeroLogger) Error(message string)
func (*ZeroLogger) Errorf ¶
func (logger *ZeroLogger) Errorf(format string, values ...interface{})
func (*ZeroLogger) GetLogLevel ¶
func (logger *ZeroLogger) GetLogLevel() LogLevel
func (*ZeroLogger) Info ¶
func (logger *ZeroLogger) Info(message string)
func (*ZeroLogger) Infof ¶
func (logger *ZeroLogger) Infof(format string, values ...interface{})
func (*ZeroLogger) Panic ¶
func (logger *ZeroLogger) Panic(message string)
func (*ZeroLogger) Panicf ¶
func (logger *ZeroLogger) Panicf(format string, values ...interface{})
func (*ZeroLogger) SetLogLevel ¶
func (logger *ZeroLogger) SetLogLevel(level LogLevel)
func (*ZeroLogger) WithFields ¶
func (logger *ZeroLogger) WithFields(fields LogFields) Logger
func (*ZeroLogger) WithInterface ¶
func (logger *ZeroLogger) WithInterface(key string, value interface{}) Logger
func (*ZeroLogger) WithPrefix ¶
func (logger *ZeroLogger) WithPrefix(prefix string) Logger
Click to show internal directories.
Click to hide internal directories.