mzap

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 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

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.

Jump to

Keyboard shortcuts

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