log

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package log provides a thin wrapper around go.uber.org/zap.

Logger is a type alias for *zap.Logger, so all zap methods are available directly. Use NewDevelopment for local development (coloured, human-readable output) and zap.NewProduction for production (JSON output).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger = zap.Logger

Logger is an alias for *zap.Logger. All framework components that accept a logger expect this type.

func NewDevelopment

func NewDevelopment() (*Logger, error)

NewDevelopment creates a development-mode logger with coloured, human-readable output and caller information. Returns an error only if zap fails to initialise (extremely rare).

func NewNopLogger

func NewNopLogger() *Logger

NewNopLogger returns a no-op logger that discards all output. Use it in tests or when logging is not needed.

Jump to

Keyboard shortcuts

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