Documentation ¶
Index ¶
- Constants
- func Critical(a ...interface{})
- func Criticalf(format string, a ...interface{})
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Error(a ...interface{})
- func Errorf(format string, a ...interface{})
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func SetLogLevel(level LogLevel)
- func SetLogOutputFile(logFileName string)
- func SetOutput(writer io.Writer)
- func SetShowCallerInfo(isEnable bool)
- func Trace(tracelevel int, a ...interface{})
- func Tracef(tracelevel int, format string, a ...interface{})
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- type LogLevel
Constants ¶
const ( // LogLevelCritical is the critical log level LogLevelCritical = "CRITICAL" // LogLevelError is the error log level LogLevelError = "ERROR" // LogLevelWarn is the warn log level LogLevelWarn = "WARN" // LogLevelDebug is the debug log level LogLevelDebug = "DEBUG" // LogLevelInfo is the info log level LogLevelInfo = "INFO" // LogLevelTrace is the trace log level LogLevelTrace = "TRACE" )
Variables ¶
This section is empty.
Functions ¶
func Critical ¶
func Critical(a ...interface{})
Critical prints a message if log level is set to CRITICAL or lower.
func Criticalf ¶
func Criticalf(format string, a ...interface{})
Criticalf prints a message if log level is set to CRITICAL or lower, with formatting.
func Debug ¶
func Debug(a ...interface{})
Debug prints a message if log level is set to DEBUG or lower.
func Debugf ¶
func Debugf(format string, a ...interface{})
Debugf prints a message if log level is set to DEBUG or lower, with formatting.
func Error ¶
func Error(a ...interface{})
Error prints a message if log level is set to ERROR or lower.
func Errorf ¶
func Errorf(format string, a ...interface{})
Errorf prints a message if log level is set to ERROR or lower, with formatting.
func Infof ¶
func Infof(format string, a ...interface{})
Infof prints a message if log level is set to INFO or lower, with formatting.
func SetLogOutputFile ¶
func SetLogOutputFile(logFileName string)
SetLogOutputFile sets the logger's output file
func SetOutput ¶
SetOutput prints a message if log level is set to CRITICAL or lower, with formatting.
func SetShowCallerInfo ¶
func SetShowCallerInfo(isEnable bool)
SetShowCallerInfo sets if the logger should log the caller info
func Trace ¶
func Trace(tracelevel int, a ...interface{})
Trace prints a message if log level is set to TRACE or lower.