logging

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubComponentField = "subcomponent"
	ComponentField    = "component"
)

Variables

View Source
var DebugEnable string

DebugEnable is a string passed in by the compiler to control the build's inclusion of Debuggable sections.

View Source
var Debuggable = DebugEnable == "true"

Debuggable means that the build should include any debugging logic in it. The compiler *should* erase anything that's otherwise in a conditional.

Functions

func Set

func Set(setter Setter) error

Set mutates the underlying root logging implementation.

Types

type Logger

type Logger interface {
	logrus.FieldLogger

	Writer() *io.PipeWriter
	WriterLevel(logrus.Level) *io.PipeWriter
}

Logger is a top level component logging facade.

func New

func New(component string, setters ...Setter) Logger

New creates a top level Logger for a given component.

type Setter

type Setter func(*logrus.Logger) error

func Level

func Level(lvl string) Setter

Level sets the level of the root logger.

type SubLogger

type SubLogger interface {
	logrus.FieldLogger
}

SubLogger is a sub component logging facade for subsystems that do not have their own top level logging owner.

Jump to

Keyboard shortcuts

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