Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Info(msg string, fields ...zap.Field) Error(msg string, fields ...zap.Field) Warn(msg string, fields ...zap.Field) Fatal(msg string, fields ...zap.Field) Debug(msg string, fields ...zap.Field) }
Logger is the interface that wraps the basic logging methods.
type LoggerWrapper ¶
type LoggerWrapper interface { SetTraceID(v string) LoggerWrapper SetVersion(v string) LoggerWrapper CreateSpan() LoggerWrapper RemoveSpan() LoggerWrapper Logger // interface extends logger TraceID() string Version() string Span() *Span }
LoggerWrapper is a wrapper for zap.Logger + Span handling
type Zap ¶
Zap is a wrapper for zap.Logger
func (*Zap) Debug ¶
Debug logs a message at DebugLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
func (*Zap) Error ¶
Error logs a message at ErrorLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
func (*Zap) Fatal ¶
Fatal logs a message at FatalLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.