contract

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const LoggingConfigurationName = "logging"

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context map[string]any

type Level

type Level string
const (
	/** @internal */
	LevelUnknown Level = "unknown"

	LevelDebug     Level = "debug"
	LevelInfo      Level = "info"
	LevelWarning   Level = "warning"
	LevelError     Level = "error"
	LevelEmergency Level = "emergency"
)

type LevelLabel added in v2.2.0

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

func LevelLabelFromInt added in v2.2.0

func LevelLabelFromInt(i int) LevelLabel

func LevelLabelFromString added in v2.2.0

func LevelLabelFromString(s string) LevelLabel

func (LevelLabel) String added in v2.2.0

func (instance LevelLabel) String() string

type LevelLabels added in v2.2.0

type LevelLabels map[Level]LevelLabel

func DefaultLevelLabels added in v2.2.0

func DefaultLevelLabels() LevelLabels

func (LevelLabels) LabelFor added in v2.2.0

func (instance LevelLabels) LabelFor(level Level) string

type Logger

type Logger interface {
	Log(level Level, message string, context Context)

	Debug(message string, context Context)

	Info(message string, context Context)

	Warning(message string, context Context)

	Error(message string, context Context)

	Emergency(message string, context Context)
}

type LoggingConfiguration added in v2.2.0

type LoggingConfiguration interface {
	LevelLabels() LevelLabels
}

Jump to

Keyboard shortcuts

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