log

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 5 Imported by: 0

README

log

Configurable logging for togo: levels, text/JSON format, and file output. Overrides the kernel baseline logger.

togo install togo-framework/log

Env: LOG_LEVEL (debug|info|warn|error), LOG_FORMAT (text|json), LOG_FILE, LOG_SERVICE. Error trackers (Sentry, GlitchTip) ship as separate plugins that subscribe to the kernel error hook.

Documentation

Overview

Package log is togo's configurable logging plugin: levels, text/JSON format, and file output. It overrides the kernel's baseline logger. Error trackers (Sentry, GlitchTip, …) ship as separate plugins that subscribe to the kernel "error" hook — this package only configures the slog sink.

Install: `togo install togo-framework/log` (blank-import registers it).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *slog.Logger

New builds a slog logger from the environment:

LOG_LEVEL   debug|info|warn|error      (default info)
LOG_FORMAT  text|json                  (default text)
LOG_FILE    path                       (default stderr; appends)
LOG_SERVICE name                       (added as a "service" attribute)

Types

This section is empty.

Jump to

Keyboard shortcuts

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