Documentation ¶
Index ¶
- func Close()
- func Debugf(msg string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Errorf(msg string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatalf(msg string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Infof(msg string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func SetLogger(lg Logger, lgLevel string)
- func Warnf(msg string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(msg string, args ...interface{})
Debugf uses fmt.Sprintf to log a `debug` templated message.
func Debugw ¶
func Debugw(msg string, keysAndValues ...interface{})
Debugw writes a 'debug' message to configured logger with some additional context.
func Errorf ¶
func Errorf(msg string, args ...interface{})
Errorf uses fmt.Sprintf to log an `error` templated message.
func Errorw ¶
func Errorw(msg string, keysAndValues ...interface{})
Errorw writes an 'error' message to configured logger with some additional context.
func Fatalf ¶
func Fatalf(msg string, args ...interface{})
Fatalf uses fmt.Sprintf to log a `fatal` templated message.
func Fatalw ¶
func Fatalw(msg string, keysAndValues ...interface{})
Fatalw writes a 'fatal' message to configured logger with some additional context.
func Infof ¶
func Infof(msg string, args ...interface{})
Infof uses fmt.Sprintf to log an `info` templated message.
func Infow ¶
func Infow(msg string, keysAndValues ...interface{})
Infow writes a 'info' message to configured logger with some additional context.
Types ¶
type Level ¶
type Level int
Level represents log level type.
const ( // DebugLevel represents DEBUG log level. DebugLevel Level = iota // InfoLevel represents INFO log level. InfoLevel // WarningLevel represents WARNING log level. WarningLevel // ErrorLevel represents ERROR log level. ErrorLevel // FatalLevel represents FATAL log level. FatalLevel // OffLevel represents a disabled logger log level. OffLevel )
type Logger ¶
type Logger interface { // Debugf uses fmt.Sprintf to log a `debug` templated message. Debugf(msg string, args ...interface{}) // Debugw writes a 'debug' message to configured logger with some additional context. Debugw(msg string, keysAndValues ...interface{}) // Infof uses fmt.Sprintf to log an `info` templated message. Infof(msg string, args ...interface{}) // Infow writes a 'info' message to configured logger with some additional context. Infow(msg string, keysAndValues ...interface{}) // Warnf uses fmt.Sprintf to log a `warn` templated message. Warnf(msg string, args ...interface{}) // Warnw writes a 'warning' message to configured logger with some additional context. Warnw(msg string, keysAndValues ...interface{}) // Errorf uses fmt.Sprintf to log an `error` templated message. Errorf(msg string, args ...interface{}) // Errorw writes an 'error' message to configured logger with some additional context. Errorw(msg string, keysAndValues ...interface{}) // Fatalf uses fmt.Sprintf to log a `fatal` templated message. Fatalf(msg string, args ...interface{}) // Fatalw writes a 'fatal' message to configured logger with some additional context. Fatalw(msg string, keysAndValues ...interface{}) }
Logger represents a common logger interface.
var Disabled Logger = &disabledLogger{}
Disabled stores a disabled logger instance.