Documentation ¶
Index ¶
- func Debug(format string, v ...interface{})
- func DebugErr(err error, format string, v ...interface{})
- func Error(format string, v ...interface{})
- func ErrorErr(err error, format string, v ...interface{})
- func Info(format string, v ...interface{})
- func InfoErr(err error, format string, v ...interface{})
- func IsDebugEnabled() bool
- func IsTraceEnabled() bool
- func SetupLogger(logConfig *LogConfig, componentPrefix string) (io.WriteCloser, error)
- func Trace(format string, v ...interface{})
- func TraceErr(err error, format string, v ...interface{})
- func Warn(format string, v ...interface{})
- func WarnErr(err error, format string, v ...interface{})
- type LogConfig
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(format string, v ...interface{})
Debug logs the given formatted message and value, if level is >= DEBUG
func Error ¶
func Error(format string, v ...interface{})
Error logs the given formatted message and value, if level is >= ERROR
func Info ¶
func Info(format string, v ...interface{})
Info logs the given formatted message and value, if level is >= INFO
func IsDebugEnabled ¶
func IsDebugEnabled() bool
IsDebugEnabled returns true if log level is above DEBUG
func IsTraceEnabled ¶
func IsTraceEnabled() bool
IsTraceEnabled returns true if log level is above TRACE
func SetupLogger ¶
func SetupLogger(logConfig *LogConfig, componentPrefix string) (io.WriteCloser, error)
SetupLogger initializes logger with the provided configuration
func Trace ¶
func Trace(format string, v ...interface{})
Trace logs the given formatted message and value, if level is >= TRACE
Types ¶
type LogConfig ¶
type LogConfig struct { LogFile string `json:"logFile,omitempty"` LogLevel string `json:"logLevel,omitempty"` LogFileSize int `json:"logFileSize,omitempty"` LogFileCount int `json:"logFileCount,omitempty"` LogFileMaxAge int `json:"logFileMaxAge,omitempty"` }
LogConfig contains logging configuration
Click to show internal directories.
Click to hide internal directories.