logger

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package logger provides ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level        string
	Output       io.Writer
	ReportCaller bool
	Prefix       string
}

Config holds logging configuration.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns sensible default configuration.

type Logger

type Logger interface {
	Debug(msg string, args ...any)
	Info(msg string, args ...any)
	Warn(msg string, args ...any)
	Error(msg string, args ...any)
}

Logger interface for logging operations.

var Default Logger = &NoOpLogger{}

Default returns a no-op logger by default.

func NewLogger

func NewLogger(cfg *Config) Logger

type NoOpLogger

type NoOpLogger struct{}

NoOpLogger provides a no-op logger implementation.

func (*NoOpLogger) Debug

func (l *NoOpLogger) Debug(_ string, _ ...any)

func (*NoOpLogger) Error

func (l *NoOpLogger) Error(_ string, _ ...any)

func (*NoOpLogger) Info

func (l *NoOpLogger) Info(_ string, _ ...any)

func (*NoOpLogger) Warn

func (l *NoOpLogger) Warn(_ string, _ ...any)

Jump to

Keyboard shortcuts

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