logging

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package logging creates application loggers with a small, deployment-friendly configuration surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(format LogFormat, debug bool, output io.Writer) *slog.Logger

Setup creates a structured logger for the selected format and level. Unknown formats use JSON so production logs remain machine-readable.

Types

type LogFormat

type LogFormat string

LogFormat defines a supported structured log format.

const (
	// LogFormatText writes human-readable, key-value log records.
	LogFormatText LogFormat = "text"
	// LogFormatJSON writes structured JSON log records for log aggregation systems.
	LogFormatJSON LogFormat = "json"
)

Jump to

Keyboard shortcuts

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