mzap

package
v1.29.0-beta.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeLogger

func InitializeLogger() mlog.Logger

InitializeLogger initializes our log layer and returns it

Types

type ZapWithTraceLogger added in v1.23.0

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 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) WithDefaultMessageTemplate added in v1.27.0

func (l *ZapWithTraceLogger) WithDefaultMessageTemplate(message string) mlog.Logger

WithDefaultMessageTemplate sets the default message template for the logger.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL