logger

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logger builds the *slog.Logger used by the CLI in production, development, raw, or none mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLogger

func BuildLogger(level, mode string) (*slog.Logger, error)

BuildLogger returns a logger for the mode and level; an unknown mode falls back to development.

func Discard

func Discard() *slog.Logger

Discard returns a no-op logger without a BuildLogger call.

Types

type Mode

type Mode string

Mode names recognized by BuildLogger.

const (
	None        Mode = "none"
	Off         Mode = "off"
	Production  Mode = "production"
	Development Mode = "development"
	Raw         Mode = "raw"
)

Jump to

Keyboard shortcuts

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