Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDebugLogger ¶
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 ¶
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.