logger

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Package logger provides a logger interface and a null logger implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeZapLogger

func MakeZapLogger() *zap.Logger

MakeZapLogger is it's own method so envs/configs are persisted across metrics handlers.

Types

type ExperimentalLogger

type ExperimentalLogger interface {
	Debugw(ctx context.Context, msg string, keysAndValues ...interface{})
	Debugf(ctx context.Context, template string, args ...interface{})
	Infow(ctx context.Context, msg string, keysAndValues ...interface{})
	Infof(ctx context.Context, template string, args ...interface{})
	Warnw(ctx context.Context, msg string, keysAndValues ...interface{})
	Warnf(ctx context.Context, template string, args ...interface{})
	Errorw(ctx context.Context, msg string, keysAndValues ...interface{})
	Errorf(ctx context.Context, template string, args ...interface{})
	Dpanicf(ctx context.Context, msg string, keysAndValues ...interface{})
	Dpanicw(ctx context.Context, template string, args ...interface{})
	Fatalf(ctx context.Context, msg string, keysAndValues ...interface{})
	Fatalw(ctx context.Context, template string, args ...interface{})
	// WithOptions returns a new ExperimentalLogger with the given options applied.
	WithOptions(opts ...zap.Option) ExperimentalLogger
}

ExperimentalLogger ...

func MakeWrappedSugaredLogger

func MakeWrappedSugaredLogger(sugaredLogger *otelzap.SugaredLogger) ExperimentalLogger

MakeWrappedSugaredLogger creates a new wrapped sugar logger.

func NewNullLogger

func NewNullLogger() ExperimentalLogger

NewNullLogger creates a new null logger.

Jump to

Keyboard shortcuts

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