log

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package log provides logging functionality for quad-ops.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger added in v0.21.0

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

Logger defines the interface for logging operations.

func NewLogger added in v0.21.0

func NewLogger(verbose bool) Logger

NewLogger creates a new logger with the specified verbosity.

func NewSlogAdapter added in v0.21.0

func NewSlogAdapter(slogLogger *slog.Logger) Logger

NewSlogAdapter creates a Logger from an slog.Logger.

func Nop added in v0.21.0

func Nop() Logger

Nop returns a logger that discards all output.

type SlogAdapter added in v0.21.0

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

SlogAdapter wraps slog.Logger to implement our Logger interface.

func (*SlogAdapter) Debug added in v0.21.0

func (s *SlogAdapter) Debug(msg string, args ...any)

Debug logs a debug message.

func (*SlogAdapter) Error added in v0.21.0

func (s *SlogAdapter) Error(msg string, args ...any)

Error logs an error message.

func (*SlogAdapter) Info added in v0.21.0

func (s *SlogAdapter) Info(msg string, args ...any)

Info logs an info message.

func (*SlogAdapter) Warn added in v0.21.0

func (s *SlogAdapter) Warn(msg string, args ...any)

Warn logs a warning message.

Jump to

Keyboard shortcuts

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