Documentation ¶
Index ¶
- func InitializeLogger() mlog.Logger
- type ZapWithTraceLogger
- func (l *ZapWithTraceLogger) Debug(args ...any)
- func (l *ZapWithTraceLogger) Debugf(format string, args ...any)
- func (l *ZapWithTraceLogger) Debugln(args ...any)
- func (l *ZapWithTraceLogger) Error(args ...any)
- func (l *ZapWithTraceLogger) Errorf(format string, args ...any)
- func (l *ZapWithTraceLogger) Errorln(args ...any)
- func (l *ZapWithTraceLogger) Fatal(args ...any)
- func (l *ZapWithTraceLogger) Fatalf(format string, args ...any)
- func (l *ZapWithTraceLogger) Fatalln(args ...any)
- func (l *ZapWithTraceLogger) Info(args ...any)
- func (l *ZapWithTraceLogger) Infof(format string, args ...any)
- func (l *ZapWithTraceLogger) Infoln(args ...any)
- func (l *ZapWithTraceLogger) Sync() error
- func (l *ZapWithTraceLogger) Warn(args ...any)
- func (l *ZapWithTraceLogger) Warnf(format string, args ...any)
- func (l *ZapWithTraceLogger) Warnln(args ...any)
- func (l *ZapWithTraceLogger) WithDefaultMessageTemplate(message string) mlog.Logger
- func (l *ZapWithTraceLogger) WithFields(fields ...any) mlog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeLogger ¶
InitializeLogger initializes our log layer and returns it
Types ¶
type ZapWithTraceLogger ¶
type ZapWithTraceLogger struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
ZapWithTraceLogger is a wrapper of otelzap.SugaredLogger.
It implements Logger interface. The shutdown function is used to close the logger provider.
func (*ZapWithTraceLogger) Debug ¶
func (l *ZapWithTraceLogger) Debug(args ...any)
Debug implements Debug Logger interface function.
func (*ZapWithTraceLogger) Debugf ¶
func (l *ZapWithTraceLogger) Debugf(format string, args ...any)
Debugf implements Debugf Logger interface function.
func (*ZapWithTraceLogger) Debugln ¶
func (l *ZapWithTraceLogger) Debugln(args ...any)
Debugln implements Debugln Logger interface function.
func (*ZapWithTraceLogger) Error ¶
func (l *ZapWithTraceLogger) Error(args ...any)
Error implements Error Logger interface function.
func (*ZapWithTraceLogger) Errorf ¶
func (l *ZapWithTraceLogger) Errorf(format string, args ...any)
Errorf implements Errorf Logger interface function.
func (*ZapWithTraceLogger) Errorln ¶
func (l *ZapWithTraceLogger) Errorln(args ...any)
Errorln implements Errorln Logger interface function.
func (*ZapWithTraceLogger) Fatal ¶
func (l *ZapWithTraceLogger) Fatal(args ...any)
Fatal implements Fatal Logger interface function.
func (*ZapWithTraceLogger) Fatalf ¶
func (l *ZapWithTraceLogger) Fatalf(format string, args ...any)
Fatalf implements Fatalf Logger interface function.
func (*ZapWithTraceLogger) Fatalln ¶
func (l *ZapWithTraceLogger) Fatalln(args ...any)
Fatalln implements Fatalln Logger interface function.
func (*ZapWithTraceLogger) Info ¶
func (l *ZapWithTraceLogger) Info(args ...any)
Info implements Info Logger interface function.
func (*ZapWithTraceLogger) Infof ¶
func (l *ZapWithTraceLogger) Infof(format string, args ...any)
Infof implements Infof Logger interface function.
func (*ZapWithTraceLogger) Infoln ¶
func (l *ZapWithTraceLogger) Infoln(args ...any)
Infoln implements Infoln Logger interface function.
func (*ZapWithTraceLogger) Sync ¶
func (l *ZapWithTraceLogger) Sync() error
Sync implements Sync Logger interface function.
Sync calls the underlying Core's Sync method, flushing any buffered log entries as well as closing the logger provider used by open telemetry. Applications should take care to call Sync before exiting.
func (*ZapWithTraceLogger) Warn ¶
func (l *ZapWithTraceLogger) Warn(args ...any)
Warn implements Warn Logger interface function.
func (*ZapWithTraceLogger) Warnf ¶
func (l *ZapWithTraceLogger) Warnf(format string, args ...any)
Warnf implements Warnf Logger interface function.
func (*ZapWithTraceLogger) Warnln ¶
func (l *ZapWithTraceLogger) Warnln(args ...any)
Warnln implements Warnln Logger interface function.
func (*ZapWithTraceLogger) WithDefaultMessageTemplate ¶
func (l *ZapWithTraceLogger) WithDefaultMessageTemplate(message string) mlog.Logger
WithDefaultMessageTemplate sets the default message template for the logger.
func (*ZapWithTraceLogger) WithFields ¶
func (l *ZapWithTraceLogger) WithFields(fields ...any) mlog.Logger
WithFields adds structured context to the logger. It returns a new logger and leaves the original unchanged.