logger

package
v0.229.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logger constructs the project's zerolog.Logger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(level string) zerolog.Logger

New returns a logger styled for humans reading a local-dev / CI tail. Output goes through zerolog's ConsoleWriter with:

  • a compact `HH:MM:SS.mmm` timestamp (year/date isn't useful in a dev tail and just shifts the message column right);
  • colourised full-word level labels (TRACE/DEBUG/INFO/WARNING/ ERROR/FATAL/PANIC) so a reader doesn't have to map a three- letter code in their head;
  • a single eye-catching glyph on warning/error/fatal/panic only — `⚠` for warning, `✗` for the rest — so unusual lines stand out against a sea of info without adding noise to the common case.

When stdout isn't a TTY (piped to a file, captured by CI, …) we drop both the colour and the glyph so log scrapers see plain ASCII.

Auth0-mock is a local-dev / CI fixture, never an exposed production service, so optimising for human scannability over JSON-aggregator friendliness is the right call. If you ever need JSON for an aggregator, replace this constructor — don't add a toggle.

Invalid log levels fall back to info with a one-line stderr warning rather than silently dropping logs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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