Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func HideGoRoutineID()
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func SetLevel(level Level)
- func ShowGoRoutineID()
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Level
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) HideGoRoutineID()
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) ShowGoRoutineID()
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf is for debug level logging events.
func Error ¶
func Error(args ...interface{})
Error is for unexpected and unrecoverable fatal events.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf is for unexpected and unrecoverable fatal events.
func HideGoRoutineID ¶
func HideGoRoutineID()
HideGoRoutineID disables appending the goroutine ID to the log output.
func Infof ¶
func Infof(format string, args ...interface{})
Infof is for high granularity logging events.
func ShowGoRoutineID ¶
func ShowGoRoutineID()
ShowGoRoutineID enables appending the goroutine ID to the log output.
Types ¶
type Level ¶
type Level int
Level represents the logging level type enumeration.
const ( // DebugLevel logging is for high granularity development level logging. DebugLevel Level = 1 // InfoLevel logging is for logging events. InfoLevel Level = 2 // WarnLevel logging is for unexpected and recoverable events. WarnLevel Level = 3 // ErrorLevel logging is for unexpected and unrecoverable fatal events. ErrorLevel Level = 4 )
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger represents a basic logging struct.
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Debug is for debug level logging events.
func (*Logger) Error ¶
func (l *Logger) Error(args ...interface{})
Error is for unexpected and unrecoverable fatal events.
func (*Logger) HideGoRoutineID ¶
func (l *Logger) HideGoRoutineID()
HideGoRoutineID disables appending the goroutine ID to the log output.
func (*Logger) Info ¶
func (l *Logger) Info(args ...interface{})
Info is for high granularity logging events.
func (*Logger) ShowGoRoutineID ¶
func (l *Logger) ShowGoRoutineID()
ShowGoRoutineID enables appending the goroutine ID to the log output.