logging

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logging provides a configurable slog-based logger for the proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(level slog.Level, file string) (*slog.Logger, io.Closer, error)

New creates a *slog.Logger that writes human-readable text to stderr (always) and, when file is non-empty, also writes machine-readable JSON to that file. Both streams honour the same level. Returns the logger, a Closer for the log file (no-op when no file is configured), and any error opening the file.

func ParseLevel

func ParseLevel(s string) (slog.Level, error)

ParseLevel parses s as a log level (case-insensitive). Valid values are "error", "warn", "info", and "debug".

Types

This section is empty.

Jump to

Keyboard shortcuts

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