named

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLogger

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

DefaultLogger is the default mode logger that prefixes messages with a header.

func NewDefaultLogger

func NewDefaultLogger(header string, logger gologgermode.Logger) (
	*DefaultLogger,
	error,
)

NewDefaultLogger creates a new DefaultLogger with the given header and logger.

Parameters:

header - the prefix for all log messages.
logger - the underlying logger to delegate to.

Returns:

A pointer to DefaultLogger and an error if logger is nil.

func (DefaultLogger) Critical

func (d DefaultLogger) Critical(subheader string, details ...string)

Critical logs a critical message with the DefaultLogger's header.

Parameters:

subheader - a short description of the message.
details - optional additional details.

func (DefaultLogger) Debug

func (d DefaultLogger) Debug(subheader string, details ...string)

Debug logs a debug message with the DefaultLogger's header.

Parameters:

subheader - a short description of the message.
details - optional additional details.

func (DefaultLogger) Error

func (d DefaultLogger) Error(subheader string, errors ...error)

Error logs an error message with the DefaultLogger's header.

Parameters:

subheader - a short description of the error.
errors - the error values to log.

func (DefaultLogger) Info

func (d DefaultLogger) Info(subheader string, details ...string)

Info logs an informational message with the DefaultLogger's header.

Parameters:

subheader - a short description of the message.
details - optional additional details.

func (DefaultLogger) Warning

func (d DefaultLogger) Warning(subheader string, details ...string)

Warning logs a warning message with the DefaultLogger's header.

Parameters:

subheader - a short description of the message.
details - optional additional details.

type Logger

type Logger interface {
	// Info logs an informational message.
	//
	// Parameters:
	//   subheader - a short description of the message.
	//   details - optional additional details.
	Info(subheader string, details ...string)
	// Error logs an error message.
	//
	// Parameters:
	//   subheader - a short description of the error.
	//   errors - the error values to log.
	Error(subheader string, errors ...error)
	// Debug logs a debug message.
	//
	// Parameters:
	//   subheader - a short description of the message.
	//   details - optional additional details.
	Debug(subheader string, details ...string)
	// Critical logs a critical message.
	//
	// Parameters:
	//   subheader - a short description of the message.
	//   details - optional additional details.
	Critical(subheader string, details ...string)
	// Warning logs a warning message.
	//
	// Parameters:
	//   subheader - a short description of the message.
	//   details - optional additional details.
	Warning(subheader string, details ...string)
}

Logger provides methods for logging messages at various severity levels for a specific mode.

Jump to

Keyboard shortcuts

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