logging

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(name string) zerolog.Logger

GetLogger returns a contextualized logger with the given name

func LogCommand

func LogCommand(cmd string, args []string)

LogCommand logs a command execution with its arguments

func LogDuration

func LogDuration(start time.Time, operation string)

LogDuration logs the duration of an operation

func LogOperationStart

func LogOperationStart(logger zerolog.Logger, operation string) func()

LogOperationStart logs the start of an operation and returns a function to log its completion

func Must

func Must(err error, msg string)

Must logs a fatal error and exits if err is not nil

func SetupLogger

func SetupLogger(verbosity int)

SetupLogger configures the global logger based on verbosity level It sets up dual output to both console and a log file

func WithFields

func WithFields(fields map[string]interface{}) zerolog.Logger

WithFields returns a logger with additional fields

Types

This section is empty.

Jump to

Keyboard shortcuts

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