logs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(level zapcore.Level) (*zap.Logger, func() error, error)

Init initialises a production-grade zap logger at the given level and returns a sync function that should be called before exit to flush buffered log entries.

func Node

func Node(logger *zap.Logger, nodeID string) *zap.Logger

Node returns a logger enriched with the node_id field for correlated logging.

func ParseLevel added in v1.1.1

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

ParseLevel maps a flag value to a zap level. Empty means info, so unset flags and old callers keep today's behavior. Anything else fails loudly instead of silently running at an unintended level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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