Documentation
¶
Index ¶
- func GetLevel(module string) apilogging.Level
- func HideCallerInfo(module string, level apilogging.Level)
- func InitLogger(l apilogging.LoggerProvider)
- func IsEnabledFor(module string, level apilogging.Level) bool
- func LoggerProvider() apilogging.LoggerProvider
- func SetLevel(module string, level apilogging.Level)
- func ShowCallerInfo(module string, level apilogging.Level)
- func VerifyBasicLogging(t *testing.T, level apilogging.Level, loggerFunc fn, loggerFuncf fnf, ...)
- func VerifyCriticalLoggings(t *testing.T, level apilogging.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 GetLevel ¶
func GetLevel(module string) apilogging.Level
GetLevel - getting log level for given module
func HideCallerInfo ¶
func HideCallerInfo(module string, level apilogging.Level)
HideCallerInfo - Do not show caller info in log lines for given log level
func InitLogger ¶
func InitLogger(l apilogging.LoggerProvider)
InitLogger sets custom logger which will be used over deflogger. It is required to call this function before making any loggings.
func IsEnabledFor ¶
func IsEnabledFor(module string, level apilogging.Level) bool
IsEnabledFor - Check if given log level is enabled for given module
func LoggerProvider ¶
func LoggerProvider() apilogging.LoggerProvider
LoggerProvider returns logging provider for SDK logger
func SetLevel ¶
func SetLevel(module string, level apilogging.Level)
SetLevel - setting log level for given module
func ShowCallerInfo ¶
func ShowCallerInfo(module string, level apilogging.Level)
ShowCallerInfo - Show caller info in log lines for given log level
func VerifyBasicLogging ¶
func VerifyBasicLogging(t *testing.T, level apilogging.Level, loggerFunc fn, loggerFuncf fnf, buf *bytes.Buffer, verifyCustom bool, moduleName string)
VerifyBasicLogging utility func which does job calling and verifying basic log level functions - DEBUG, INFO, ERROR, WARNING
func VerifyCriticalLoggings ¶
func VerifyCriticalLoggings(t *testing.T, level apilogging.Level, loggerFunc fn, loggerFuncf fnf, buf *bytes.Buffer)
VerifyCriticalLoggings utility func which does job calling and verifying CRITICAL log level functions - PANIC
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.