Documentation ¶
Index ¶
- func GetLevel(module string) api.Level
- func HideCallerInfo(module string, level api.Level)
- func InitLogger(l api.LoggerProvider)
- func IsEnabledFor(module string, level api.Level) bool
- func LoggerProvider() api.LoggerProvider
- func SetLevel(module string, level api.Level)
- func ShowCallerInfo(module string, level api.Level)
- func VerifyBasicLogging(t *testing.T, level api.Level, loggerFunc fn, loggerFuncf fnf, ...)
- func VerifyCriticalLoggings(t *testing.T, level api.Level, loggerFunc fn, loggerFuncf fnf, ...)
- type Log
- func (l *Log) ChangeOutput(output io.Writer)
- func (l *Log) Debug(args ...interface{})
- func (l *Log) Debugf(format string, args ...interface{})
- func (l *Log) Debugln(args ...interface{})
- func (l *Log) Error(args ...interface{})
- func (l *Log) Errorf(format string, args ...interface{})
- func (l *Log) Errorln(args ...interface{})
- func (l *Log) Fatal(args ...interface{})
- func (l *Log) Fatalf(format string, args ...interface{})
- func (l *Log) Fatalln(args ...interface{})
- func (l *Log) Info(args ...interface{})
- func (l *Log) Infof(format string, args ...interface{})
- func (l *Log) Infoln(args ...interface{})
- func (l *Log) Panic(args ...interface{})
- func (l *Log) Panicf(format string, args ...interface{})
- func (l *Log) Panicln(args ...interface{})
- func (l *Log) Print(args ...interface{})
- func (l *Log) Printf(format string, args ...interface{})
- func (l *Log) Println(args ...interface{})
- func (l *Log) Warn(args ...interface{})
- func (l *Log) Warnf(format string, args ...interface{})
- func (l *Log) Warnln(args ...interface{})
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HideCallerInfo ¶
HideCallerInfo - Do not show caller info in log lines for given log level
func InitLogger ¶
func InitLogger(l api.LoggerProvider)
InitLogger sets custom logger which will be used over deflogger. It is required to call this function before making any loggings.
func IsEnabledFor ¶
IsEnabledFor - Check if given log level is enabled for given module
func LoggerProvider ¶
func LoggerProvider() api.LoggerProvider
LoggerProvider returns logging provider for SDK logger
func ShowCallerInfo ¶
ShowCallerInfo - Show caller info in log lines for given log level
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log is a standard SDK logger implementation
func (*Log) ChangeOutput ¶
ChangeOutput for changing output destination for the logger.
func (*Log) Debug ¶
func (l *Log) Debug(args ...interface{})
Debug calls go log.Output. Arguments are handled in the manner of fmt.Print.
func (*Log) Debugln ¶
func (l *Log) Debugln(args ...interface{})
Debugln calls go log.Output. Arguments are handled in the manner of fmt.Println.
func (*Log) Error ¶
func (l *Log) Error(args ...interface{})
Error calls go log.Output. Arguments are handled in the manner of fmt.Print.
func (*Log) Errorln ¶
func (l *Log) Errorln(args ...interface{})
Errorln calls go log.Output. Arguments are handled in the manner of fmt.Println.
func (*Log) Fatal ¶
func (l *Log) Fatal(args ...interface{})
Fatal is CRITICAL log followed by a call to os.Exit(1).
func (*Log) Fatalln ¶
func (l *Log) Fatalln(args ...interface{})
Fatalln is CRITICAL log ln followed by a call to os.Exit(1).
func (*Log) Info ¶
func (l *Log) Info(args ...interface{})
Info calls go log.Output. Arguments are handled in the manner of fmt.Print.
func (*Log) Infoln ¶
func (l *Log) Infoln(args ...interface{})
Infoln calls go log.Output. Arguments are handled in the manner of fmt.Println.
func (*Log) Panic ¶
func (l *Log) Panic(args ...interface{})
Panic is CRITICAL log followed by a call to panic()
func (*Log) Panicln ¶
func (l *Log) Panicln(args ...interface{})
Panicln is CRITICAL log ln followed by a call to panic()
func (*Log) Print ¶
func (l *Log) Print(args ...interface{})
Print calls go log.Output. Arguments are handled in the manner of fmt.Print.
func (*Log) Println ¶
func (l *Log) Println(args ...interface{})
Println calls go log.Output. Arguments are handled in the manner of fmt.Println.
func (*Log) Warn ¶
func (l *Log) Warn(args ...interface{})
Warn calls go log.Output. Arguments are handled in the manner of fmt.Print.