mzap

package
v1.26.0-beta.13 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 7 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 *otelzap.SugaredLogger
}

ZapWithTraceLogger is a wrapper of otelzap.SugaredLogger.

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) DebugfContext added in v1.23.0

func (l *ZapWithTraceLogger) DebugfContext(ctx context.Context, format string, args ...any)

DebugfContext implements DebugfContext function from otelzap which uses context.Context to log with span information if available.

func (*ZapWithTraceLogger) Debugln added in v1.23.0

func (l *ZapWithTraceLogger) Debugln(args ...any)

Debugln implements Debugln Logger interface function

func (*ZapWithTraceLogger) DebugwContext added in v1.23.0

func (l *ZapWithTraceLogger) DebugwContext(ctx context.Context, format string, keysAndValues ...any)

DebugwContext implements DebugwContext function from otelzap which uses context.Context to log with span information if available and the key-value pairs as structured context.

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) ErrorfContext added in v1.23.0

func (l *ZapWithTraceLogger) ErrorfContext(ctx context.Context, format string, args ...any)

ErrorfContext implements ErrorfContext function from otelzap which uses context.Context to log with span information if available.

func (*ZapWithTraceLogger) Errorln added in v1.23.0

func (l *ZapWithTraceLogger) Errorln(args ...any)

Errorln implements Errorln Logger interface function

func (*ZapWithTraceLogger) ErrorwContext added in v1.23.0

func (l *ZapWithTraceLogger) ErrorwContext(ctx context.Context, format string, keysAndValues ...any)

ErrorwContext implements ErrorwContext function from otelzap which uses context.Context to log with span information if available and the key-value pairs as structured context.

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) FatalfContext added in v1.23.0

func (l *ZapWithTraceLogger) FatalfContext(ctx context.Context, format string, args ...any)

FatalfContext implements FatalfContext function from otelzap which uses context.Context to log with span information if available.

func (*ZapWithTraceLogger) Fatalln added in v1.23.0

func (l *ZapWithTraceLogger) Fatalln(args ...any)

Fatalln implements Fatalln Logger interface function

func (*ZapWithTraceLogger) FatalwContext added in v1.23.0

func (l *ZapWithTraceLogger) FatalwContext(ctx context.Context, format string, keysAndValues ...any)

FatalwContext implements FatalwContext function from otelzap which uses context.Context to log with span information if available and the key-value pairs as structured context.

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) InfofContext added in v1.23.0

func (l *ZapWithTraceLogger) InfofContext(ctx context.Context, format string, args ...any)

InfofContext implements InfofContext function from otelzap which uses context.Context to log with span information if available.

func (*ZapWithTraceLogger) Infoln added in v1.23.0

func (l *ZapWithTraceLogger) Infoln(args ...any)

Infoln implements Infoln Logger interface function.

func (*ZapWithTraceLogger) InfowContext added in v1.23.0

func (l *ZapWithTraceLogger) InfowContext(ctx context.Context, format string, keysAndValues ...any)

InfowContext implements InfowContext function from otelzap which uses context.Context to log with span information if available and the key-value pairs as structured context.

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. 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) WarnfContext added in v1.23.0

func (l *ZapWithTraceLogger) WarnfContext(ctx context.Context, format string, args ...any)

WarnfContext implements WarnfContext function from otelzap which uses context.Context to log with span information if available.

func (*ZapWithTraceLogger) Warnln added in v1.23.0

func (l *ZapWithTraceLogger) Warnln(args ...any)

Warnln implements Warnln Logger interface function

func (*ZapWithTraceLogger) WarnwContext added in v1.23.0

func (l *ZapWithTraceLogger) WarnwContext(ctx context.Context, format string, keysAndValues ...any)

WarnwContext implements WarnwContext function from otelzap which uses context.Context to log with span information if available and the key-value pairs as structured context.

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