Documentation ¶
Index ¶
- func Configure(cfg *Config)
- func Debug(format string, args ...interface{})
- func DebugErr(err error, format string, args ...interface{})
- func Error(format string, args ...interface{})
- func ErrorErr(err error, format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func FatalErr(err error, format string, args ...interface{})
- func Info(format string, args ...interface{})
- func InfoErr(err error, format string, args ...interface{})
- func NewError(message string) error
- func NewErrorf(format string, args ...interface{}) error
- func Panic(format string, args ...interface{})
- func PanicErr(err error, format string, args ...interface{})
- func Trace(format string, args ...interface{})
- func TraceErr(err error, format string, args ...interface{})
- func Warn(format string, args ...interface{})
- func WarnErr(err error, format string, args ...interface{})
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(cfg *Config)
Configure applies the full configuration of the logger instance based on the provided configuration
func Debug ¶
func Debug(format string, args ...interface{})
Debug logs a message at level Debug on the standard logger.
func Error ¶
func Error(format string, args ...interface{})
Error logs a message at level Error on the standard logger.
func Fatal ¶
func Fatal(format string, args ...interface{})
Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func FatalErr ¶
FatalErr logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Info ¶
func Info(format string, args ...interface{})
Info logs a message at level Info on the standard logger.
func Panic ¶
func Panic(format string, args ...interface{})
Panic logs a message at level Panic on the standard logger.
func Trace ¶
func Trace(format string, args ...interface{})
Trace logs a message at level Trace on the standard logger.
Types ¶
type Config ¶
type Config struct { LogFile string `json:"log_file,omitempty"` LogLevel string `json:"log_level,omitempty"` LogFileSize int `json:"log_file_size,omitempty"` LogFileCount int `json:"log_file_count,omitempty"` LogFileMaxAge int `json:"log_file_max_age,omitempty"` Syslog bool `json:"syslog,omitempty"` }
Config represents the configuration options to be set for logging