logger

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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