log

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int8

A Level is a logging priority. Higher levels are more important.

const (
	// LevelDebug logs are typically voluminous, and are usually disabled in
	// production.
	LevelDebug Level = iota + 1
	// LevelInfo is the default logging priority.
	LevelInfo
	// LevelWarn logs are more important than Info, but don't need individual
	// human review.
	LevelWarn
	// LevelError logs are high-priority. If an application is running smoothly,
	// it shouldn't generate any error-level logs.
	LevelError
	// LevelPanic logs a message, then panics.
	LevelPanic
)

type Logger

type Logger interface {
	Named(name string) Logger
	WithCallerSkip(skip int) Logger
	Enabled(level Level) bool
	Sync()
	Debug(message string)
	Debugf(template string, args ...any)
	Info(message string)
	Infof(template string, args ...any)
	Warn(message string)
	Warnf(template string, args ...any)
	Error(message string)
	Errorf(template string, args ...any)
	Panic(message string)
	Panicf(template string, args ...any)
}

Jump to

Keyboard shortcuts

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