logging

package
v0.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MAX_WRITE_RETRIES = 10
View Source
const REDACTION_TERMS string = "internal_redaction_terms"

REDACTION_TERMS ([]string) arbitrary literal terms to redact from analytics/log output, in addition to the token/OAuth-derived terms GetScrubDictFromConfig already adds. Lives here rather than pkg/configuration since this package is its only reader, matching the precedent of local_workflows.ConfigurationNewAuthenticationToken.

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

func Scrub added in v0.15.1

func Scrub(data []byte, scrubDict ScrubbingDict) []byte

Scrub applies scrubDict's redaction rules to data, the same logic used internally by ScrubbingLogWriter.

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