levelchanger

package
v0.0.0-...-bac071f Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLevelChangerOption

func NewLevelChangerOption(from, to zapcore.Level, conditions ...LevelChangeCondition) zap.Option

Create a zap option that wraps a core with a new levelChangerCore.

Types

type LevelChangeCondition

type LevelChangeCondition func(entry zapcore.Entry, fields []zapcore.Field) bool

func FilePathLevelChangeCondition

func FilePathLevelChangeCondition(pathSubstr string) LevelChangeCondition

Make a level change condition that passes if the Entry's Caller File contains a substring. Can be used to change the level of all logs from some file or package.

Jump to

Keyboard shortcuts

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