Documentation
¶
Index ¶
- func Debug(msg string)
- func Debugf(format string, args ...interface{})
- func Debugw(msg string, keyvals ...interface{})
- func Enabled(level Level) bool
- func Error(msg string)
- func Errorf(format string, args ...interface{})
- func Errorw(msg string, keyvals ...interface{})
- func Fatal(msg string)
- func Fatalf(format string, args ...interface{})
- func Fatalw(msg string, keyvals ...interface{})
- func Info(msg string)
- func Infof(format string, args ...interface{})
- func Infow(msg string, keyvals ...interface{})
- func Panic(msg string)
- func Panicf(format string, args ...interface{})
- func Panicw(msg string, keyvals ...interface{})
- func SetLogger(logger Logger)
- func Warn(msg string)
- func Warnf(format string, args ...interface{})
- func Warnw(msg string, keyvals ...interface{})
- type DefaultLogger
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf is used to print formatted debug level logs
func Debugw ¶
func Debugw(msg string, keyvals ...interface{})
Debugw is used to print debug level logs containing additional kv information
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf is used to print formatted error level logs
func Errorw ¶
func Errorw(msg string, keyvals ...interface{})
Errorw is used to print error level logs containing additional kv information
func Fatal ¶
func Fatal(msg string)
Fatal is used to print fatal level logs This function will call the os.Exit(1) to exit the process after the log is printed
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf is used to print formatted fatal level logs This function will call the os.Exit(1) to exit the process after the log is printed
func Fatalw ¶
func Fatalw(msg string, keyvals ...interface{})
Fatalw is used to print fatal level logs containing additional kv information This function will call the os.Exit(1) to exit the process after the log is printed
func Infof ¶
func Infof(format string, args ...interface{})
Infof is used to print formatted info level logs
func Infow ¶
func Infow(msg string, keyvals ...interface{})
Infow is used to print info level logs containing additional kv information
func Panic ¶
func Panic(msg string)
Panic is used to print panic level logs This function will call the panic(err) after the log is printed
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf is used to print formatted panic level logs This function will call the panic(err) after the log is printed
func Panicw ¶
func Panicw(msg string, keyvals ...interface{})
Panicw is used to print painc level logs containing additional kv information This function will call the panic(err) after the log is printed
func SetLogger ¶
func SetLogger(logger Logger)
SetLogger is configured here to use the global logging component
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
}
DefaultLogger provides the default implementation of the logging component
func (*DefaultLogger) Enabled ¶
func (d *DefaultLogger) Enabled(level Level) bool
Enabled implements log level queries for default log components
func (*DefaultLogger) Log ¶
func (d *DefaultLogger) Log(level Level, msg string, keyvals ...interface{})
Log implements the log output of the default log component
type Level ¶
type Level int
Level is the definition of the log level in the log component
const ( // DebugLevel means Debug and above log level DebugLevel Level = iota // InfoLevel means Info and above log level InfoLevel // WarnLevel means Warn and above log level WarnLevel // ErrorLevel means Error and above log level ErrorLevel // PanicLevel means Panic and above log level PanicLevel // FatalLevel means Fatal and above log level FatalLevel )
func ParseLevel ¶
ParseLevel provides a method for creating log level objects through strings