logger

package
v0.15.4 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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