logger

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDebugLogger

func InitDebugLogger(outpath, name string, debug bool) (*log.Logger, *os.File, error)

InitDebugLogger can be used for ANSI escape sequence colored and multi line debug logging. The name is the log filename and the outpath must exist in advance. When debug mode is not active, this function will init the logger with ioutil.Discard, and return a nil pointer for the file handle.

func InitZapLogger

func InitZapLogger(outpath, name string, debug bool) (*zap.Logger, *os.File, error)

InitZapLogger can be used for high performance logging. The name is the log filename and the outpath must exist in advance.

func InitZapLoggerWithAtomicLevel

func InitZapLoggerWithAtomicLevel(outpath, name string, debug bool) (*zap.Logger, *os.File, *zap.AtomicLevel, error)

InitZapLoggerWithAtomicLevel creates a zap logger with an atomic level that can be changed at runtime. The name is the log filename and the outpath must exist in advance. Returns the logger, file handle, atomic level, and error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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