logging

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_WRITE_RETRIES = 10
View Source
const SANITIZE_REPLACEMENT_STRING string = "***"

Variables

View Source
var SENSITIVE_FIELD_NAMES = []string{
	"headers",
	"user",
	"passw",
	"token",
	"key",
	"secret",
}

SENSITIVE_FIELD_NAMES is a list of field names that should be sanitized.

Functions

func NewScrubbingIoWriter

func NewScrubbingIoWriter(writer io.Writer, scrubDict ScrubbingDict) io.Writer

func NewScrubbingWriter

func NewScrubbingWriter(writer zerolog.LevelWriter, scrubDict ScrubbingDict) zerolog.LevelWriter

Types

type ScrubbingDict

type ScrubbingDict map[string]scrubStruct

func GetScrubDictFromConfig

func GetScrubDictFromConfig(config configuration.Configuration) ScrubbingDict

type ScrubbingLogWriter

type ScrubbingLogWriter interface {
	// AddTerm takes a regex pattern to scrub
	AddTerm(term string, matchGroup int)
	// AddTermsToReplace takes exact strings to scrub
	AddTermsToReplace(args []string)
	RemoveTerm(term string)
}

Jump to

Keyboard shortcuts

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