logs

package
v0.30.113 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Feature

func Feature(
	rootLogger logr.Logger,
	config ...func(*Installer),
) setup.Feature

Feature creates and configures logging support.

func Verbosity

func Verbosity(verbosity int) func(*Installer)

Verbosity sets the default Verbosity level when logging.

Types

type Emit

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

Emit is a FilterProvider for logging.

func (*Emit) AppliesTo

func (e *Emit) AppliesTo(
	callback miruken.Callback,
) bool

func (*Emit) Filters

func (e *Emit) Filters(
	binding miruken.Binding,
	callback any,
	composer miruken.Handler,
) ([]miruken.Filter, error)

func (*Emit) InitWithTag

func (e *Emit) InitWithTag(tag reflect.StructTag) error

func (*Emit) Required

func (e *Emit) Required() bool

type Factory

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

Factory of context specific loggers.

func (*Factory) NewContextLogger

func (f *Factory) NewContextLogger(
	p *provides.It,
) logr.Logger

NewContextLogger return a new logger in a context. The context is a name derived from the following information. If the request has an owner, the owner's type is used. Otherwise, the root logger is returned.

func (*Factory) NoConstructor added in v0.30.61

func (f *Factory) NoConstructor()

NoConstructor prevents Factory from being created implicitly. The Factory is explicitly created by the Installer which assigns the root logger.

type Installer

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

Installer configures logging support.

func (*Installer) Install

func (i *Installer) Install(b *setup.Builder) error

func (*Installer) SetVerbosity

func (i *Installer) SetVerbosity(verbosity int)

Jump to

Keyboard shortcuts

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