scrubber

package
v3.12.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scrub

func Scrub(s string) string

Scrub sanitizes a string containing an error such that any occurrence of IP endpoints is scrubbed.

Types

type Logger

type Logger struct {
	UnderlyingLogger
}

Logger is a Logger with scrubbing. All messages are scrubbed including the ones that won't be emitted. As such, this logger is less efficient than a logger without scrubbing.

func (*Logger) Debug

func (sl *Logger) Debug(message string)

Debug scrubs and emits a debug message.

func (*Logger) Debugf

func (sl *Logger) Debugf(format string, v ...interface{})

Debugf scrubs, formats, and emits a debug message.

func (*Logger) Info

func (sl *Logger) Info(message string)

Info scrubs and emits an informational message.

func (*Logger) Infof

func (sl *Logger) Infof(format string, v ...interface{})

Infof scrubs, formats, and emits an informational message.

func (*Logger) Warn

func (sl *Logger) Warn(message string)

Warn scrubs and emits a warning message.

func (*Logger) Warnf

func (sl *Logger) Warnf(format string, v ...interface{})

Warnf scrubs, formats, and emits a warning message.

type UnderlyingLogger

type UnderlyingLogger interface {
	// Debug emits a debug message.
	Debug(msg string)

	// Debugf formats and emits a debug message.
	Debugf(format string, v ...interface{})

	// Info emits an informational message.
	Info(msg string)

	// Infof formats and emits an informational message.
	Infof(format string, v ...interface{})

	// Warn emits a warning message.
	Warn(msg string)

	// Warnf formats and emits a warning message.
	Warnf(format string, v ...interface{})
}

UnderlyingLogger defines the common interface that a logger should have. It is out of the box compatible with `log.Log` in `apex/log`.

Jump to

Keyboard shortcuts

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