log

package
v2.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

config.go

log.go

Index

Constants

This section is empty.

Variables

View Source
var (
	E2eConnMutex sync.RWMutex
	E2EConnCfg   *e2eConnConfig
)
View Source
var (
	// ErrLoggerAlreadyInitialized is the error returned when the logger is already initialized
	ErrLoggerAlreadyInitialized = errors.New("logger already initialized")
)

Global variables

Functions

func Debug

func Debug(msg string, args ...any)

Debug logs a message at the debug level

func Error

func Error(msg string, args ...any)

Error logs a message at the error level

func Info

func Info(msg string, args ...any)

Info logs a message at the info level

func Start

func Start() error

Start initializes the logging package with the given configuration. If no configuration is provided, it uses the default configuration.

func Stop

func Stop()

Stop gracefully shuts down the logging system

func Warn

func Warn(msg string, args ...any)

Warn logs a message at the warn level

Types

type FieldedLogger

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

FieldedLogger allows adding predefined fields to log entries

func NewFieldedLogger

func NewFieldedLogger(args *Fields) *FieldedLogger

NewFieldedLogger creates a new FieldedLogger with the given fields

func (*FieldedLogger) Debug

func (fl *FieldedLogger) Debug(msg string, args ...any)

Debug logs a message at the debug level with the predefined fields

func (*FieldedLogger) Error

func (fl *FieldedLogger) Error(msg string, args ...any)

Error logs a message at the error level with the predefined fields

func (*FieldedLogger) Info

func (fl *FieldedLogger) Info(msg string, args ...any)

Info logs a message at the info level with the predefined fields

func (*FieldedLogger) Warn

func (fl *FieldedLogger) Warn(msg string, args ...any)

Warn logs a message at the warn level with the predefined fields

type Fields

type Fields map[string]any

Field defines an interface for fields

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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