log

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger wraps zerolog.Logger with additional methods

func Global

func Global() *Logger

Global returns the global logger

func New

func New(level, format string) *Logger

New creates a new logger instance

func (*Logger) Debug

func (l *Logger) Debug(msg string)

Debug logs a debug message

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

Debugf logs a formatted debug message

func (*Logger) Error

func (l *Logger) Error(msg string)

Error logs an error message

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

Errorf logs a formatted error message

func (*Logger) Fatal

func (l *Logger) Fatal(msg string)

Fatal logs a fatal message and exits

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, args ...interface{})

Fatalf logs a formatted fatal message and exits

func (*Logger) Info

func (l *Logger) Info(msg string)

Info logs an info message

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

Infof logs a formatted info message

func (*Logger) Warn

func (l *Logger) Warn(msg string)

Warn logs a warning message

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

Warnf logs a formatted warning message

func (*Logger) WithError

func (l *Logger) WithError(err error) *Logger

WithError adds an error to the logger

func (*Logger) WithField

func (l *Logger) WithField(key string, value interface{}) *Logger

WithField adds a field to the logger

func (*Logger) WithFields

func (l *Logger) WithFields(fields map[string]interface{}) *Logger

WithFields adds multiple fields to the logger

Jump to

Keyboard shortcuts

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