logging

package
v0.0.0-...-109c033 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogStyleJSON  = "json"
	LogStylePlain = "plain"
)
View Source
const (
	ConfLogStyle = "LOG_STYLE"
)

Variables

This section is empty.

Functions

func ConfigItems

func ConfigItems() []auconfigapi.ConfigItem

func PreliminarySetup

func PreliminarySetup()

PreliminarySetup provides minimal structured logging before we have read the configuration.

This solves the chicken and egg problem between configuration (which also configures logging) and logging, so errors in the configuration can be logged.

After reading the configuration, you should call Setup() with it.

In order to avoid log format differences in normal operation, reading the configuration should only write logs if it fails.

func Setup

func Setup() error

Setup provides fully configured plaintext or structured logging.

It also sets the default logger, so at this point even libraries that neither use slog nor aulogging will use our structured logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳