Documentation ¶
Index ¶
- type DefaultLogger
- func (nl *DefaultLogger) GetLogger() interface{}
- func (nl *DefaultLogger) LogDebug(ctx context.Context, msg string)
- func (nl *DefaultLogger) LogError(ctx context.Context, msg string, errs ...error)
- func (nl *DefaultLogger) LogFatal(ctx context.Context, msg string, errs ...error)
- func (nl *DefaultLogger) LogInfo(ctx context.Context, msg string)
- func (nl *DefaultLogger) LogPanic(ctx context.Context, msg string, errs ...error)
- func (nl *DefaultLogger) LogWarning(ctx context.Context, msg string, errs ...error)
- type Logger
- type ServiceContext
- type ZeroLogWrapper
- func (lm *ZeroLogWrapper) GetLogger() interface{}
- func (lm *ZeroLogWrapper) LogDebug(ctx context.Context, msg string)
- func (lm *ZeroLogWrapper) LogError(ctx context.Context, msg string, errs ...error)
- func (lm *ZeroLogWrapper) LogFatal(ctx context.Context, msg string, errs ...error)
- func (lm *ZeroLogWrapper) LogInfo(ctx context.Context, msg string)
- func (lm *ZeroLogWrapper) LogPanic(ctx context.Context, msg string, errs ...error)
- func (lm *ZeroLogWrapper) LogWarning(ctx context.Context, msg string, errs ...error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct{}
DefaultLogger - Logger implementation that does nothing.
func (*DefaultLogger) LogDebug ¶
func (nl *DefaultLogger) LogDebug(ctx context.Context, msg string)
LogDebug noop.
func (*DefaultLogger) LogError ¶
func (nl *DefaultLogger) LogError(ctx context.Context, msg string, errs ...error)
LogError noop.
func (*DefaultLogger) LogFatal ¶
func (nl *DefaultLogger) LogFatal(ctx context.Context, msg string, errs ...error)
LogFatal noop.
func (*DefaultLogger) LogInfo ¶
func (nl *DefaultLogger) LogInfo(ctx context.Context, msg string)
LogInfo noop.
func (*DefaultLogger) LogPanic ¶
func (nl *DefaultLogger) LogPanic(ctx context.Context, msg string, errs ...error)
LogPanic noop.
func (*DefaultLogger) LogWarning ¶
func (nl *DefaultLogger) LogWarning(ctx context.Context, msg string, errs ...error)
LogWarning noop.
type Logger ¶
type Logger interface { // LogInfo logs a message at Info level. LogInfo(ctx context.Context, msg string) // LogDebug logs a message at Debug level. LogDebug(ctx context.Context, msg string) // LogWarning logs a message at Warning level. LogWarning(ctx context.Context, msg string, errs ...error) // LogError logs a message at Error level. LogError(ctx context.Context, msg string, errs ...error) // LogPanic logs a message at Panic level then panics. LogPanic(ctx context.Context, msg string, errs ...error) // LogFatal logs a message at Fatal Level. // The logger then calls os.Exit(1), even if logging at FatalLevel is // disabled. LogFatal(ctx context.Context, msg string, errs ...error) GetLogger() interface{} }
Logger - logger interface.
func GetLogger ¶
func GetLogger() Logger
GetLogger - returns an instance of the Logger. If called before SetupLogger a no-op logger will be returned.
func SetupLogger ¶
SetupLogger sets up a new Logger with a service name override.
type ServiceContext ¶
type ZeroLogWrapper ¶
type ZeroLogWrapper struct {
// contains filtered or unexported fields
}
func (*ZeroLogWrapper) GetLogger ¶
func (lm *ZeroLogWrapper) GetLogger() interface{}
GetLogger - returns the underlying logger.
func (*ZeroLogWrapper) LogDebug ¶
func (lm *ZeroLogWrapper) LogDebug(ctx context.Context, msg string)
func (*ZeroLogWrapper) LogError ¶
func (lm *ZeroLogWrapper) LogError(ctx context.Context, msg string, errs ...error)
func (*ZeroLogWrapper) LogFatal ¶
func (lm *ZeroLogWrapper) LogFatal(ctx context.Context, msg string, errs ...error)
func (*ZeroLogWrapper) LogPanic ¶
func (lm *ZeroLogWrapper) LogPanic(ctx context.Context, msg string, errs ...error)
func (*ZeroLogWrapper) LogWarning ¶
func (lm *ZeroLogWrapper) LogWarning(ctx context.Context, msg string, errs ...error)
Click to show internal directories.
Click to hide internal directories.