logger

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfigLevel added in v1.0.0

func ApplyConfigLevel(level string) error

func SetDefaultLevel added in v1.0.0

func SetDefaultLevel(level string, pin bool) error

SetDefaultLevel changes the level of every Default logger, including those already created. A pinned level (from a flag or env var) is not overridden by ApplyConfigLevel.

Types

type Logger

type Logger struct {
	*zap.Logger
}

func Default

func Default() *Logger

func New

func New(level string, structured bool) (*Logger, error)

func (*Logger) WithContext

func (l *Logger) WithContext(ctx context.Context, fields ...zap.Field) *zap.Logger

Jump to

Keyboard shortcuts

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