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) 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 ¶ added in v1.23.0
type ZapWithTraceLogger struct {
Logger *zap.SugaredLogger
}
ZapWithTraceLogger is a wrapper of otelzap.SugaredLogger.
It implements Logger interface. The shutdown function is used to close the logger provider.
func (*ZapWithTraceLogger) Debug ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Debug(args ...any)
Debug implements Debug Logger interface function.
func (*ZapWithTraceLogger) Debugf ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Debugf(format string, args ...any)
Debugf implements Debugf Logger interface function.
func (*ZapWithTraceLogger) Debugln ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Debugln(args ...any)
Debugln implements Debugln Logger interface function
func (*ZapWithTraceLogger) Error ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Error(args ...any)
Error implements Error Logger interface function.
func (*ZapWithTraceLogger) Errorf ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Errorf(format string, args ...any)
Errorf implements Errorf Logger interface function.
func (*ZapWithTraceLogger) Errorln ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Errorln(args ...any)
Errorln implements Errorln Logger interface function
func (*ZapWithTraceLogger) Fatal ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Fatal(args ...any)
Fatal implements Fatal Logger interface function.
func (*ZapWithTraceLogger) Fatalf ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Fatalf(format string, args ...any)
Fatalf implements Fatalf Logger interface function.
func (*ZapWithTraceLogger) Fatalln ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Fatalln(args ...any)
Fatalln implements Fatalln Logger interface function
func (*ZapWithTraceLogger) Info ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Info(args ...any)
Info implements Info Logger interface function.
func (*ZapWithTraceLogger) Infof ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Infof(format string, args ...any)
Infof implements Infof Logger interface function.
func (*ZapWithTraceLogger) Infoln ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Infoln(args ...any)
Infoln implements Infoln Logger interface function.
func (*ZapWithTraceLogger) Sync ¶ added in v1.23.0
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 ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Warn(args ...any)
Warn implements Warn Logger interface function.
func (*ZapWithTraceLogger) Warnf ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Warnf(format string, args ...any)
Warnf implements Warnf Logger interface function.
func (*ZapWithTraceLogger) Warnln ¶ added in v1.23.0
func (l *ZapWithTraceLogger) Warnln(args ...any)
Warnln implements Warnln Logger interface function
func (*ZapWithTraceLogger) WithFields ¶ added in v1.23.0
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.