log

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

internal/log/log.go

Package log provides a minimal logging abstraction for Aether. It wraps the standard library logger and exposes four severity levels.

The purpose of this abstraction is to avoid forcing a specific logging framework on Aether users, while still enabling internal packages to emit useful diagnostics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int

Level represents the verbosity level of the logger.

const (
	// LevelDebug enables all log messages.
	LevelDebug Level = iota
	// LevelInfo emits informational, warning and error messages.
	LevelInfo
	// LevelWarn emits only warnings and errors.
	LevelWarn
	// LevelError emits only errors.
	LevelError
)

type Logger

type Logger interface {
	Debugf(format string, args ...any)
	Infof(format string, args ...any)
	Warnf(format string, args ...any)
	Errorf(format string, args ...any)
}

Logger is the interface that Aether uses for logging.

It is intentionally small so that it can be easily adapted to other logging frameworks if needed.

func New

func New(debug bool) Logger

New creates a new Logger instance.

If debug is true, the logger will emit messages at LevelDebug; otherwise it uses LevelInfo as a reasonable default.

Jump to

Keyboard shortcuts

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