logext

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConditionalWriter

func NewConditionalWriter(fields log.Fields, out Output, condition bool) io.Writer

NewConditionalWriter creates a new log writer that only writes when the given condition is met or debug is enabled.

func NewWriter

func NewWriter(fields log.Fields, out Output) io.Writer

NewWriter creates a new log writer.

Types

type Output

type Output int

Output type of the log output.

const (
	// Info usually is used with stdout.
	Info Output = iota

	// Error usually is used with stderr.
	Error
)

Jump to

Keyboard shortcuts

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