logging

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Redact

func Redact(s string, secrets []string) string

Redact replaces sensitive values in a string with [REDACTED]

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger provides structured logging with redaction support

func New

func New(debug, noColor bool) *Logger

New creates a new logger instance

func (*Logger) Debug

func (l *Logger) Debug(format string, args ...interface{})

Debug logs a debug message if debug mode is enabled

func (*Logger) Error

func (l *Logger) Error(format string, args ...interface{})

Error logs an error message

func (*Logger) Info

func (l *Logger) Info(format string, args ...interface{})

Info logs an informational message

func (*Logger) Warn

func (l *Logger) Warn(format string, args ...interface{})

Warn logs a warning message

type Secret

type Secret string

Secret represents a value that should be redacted in logs

func (Secret) GoString

func (s Secret) GoString() string

GoString implements the GoStringer interface for %#v formatting

func (Secret) String

func (s Secret) String() string

String implements the Stringer interface, always returning a redacted value

Jump to

Keyboard shortcuts

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