modulepackage
0.0.0-20200821225356-38d2e2c8b489
Repository: https://github.com/aunum/log.git
Documentation: pkg.go.dev
# README
log
A simple logger for Go with rich data structure support.
# Functions
Break prints a break in the logs.
BreakHard prints a hard break in the logs.
BreakPound prints a pound break in the logs.
BreakStar prints a star break in the logs.
Check if an error is nil otherwise log fatal.
Debug message.
Debugf is a formatted Debug message.
Debugv prints value in a k:v fromat.
Debugvb prints value in a k:v fromat with the value on a new line.
Debugy prints the YAML represtation of an object at Debug level.
Dump message.
Dumpf is a formatted Dump message.
Dumpv prints value in a k:v fromat.
Dumpvb prints value in a k:v fromat with the value on a new line.
Dumpy prints the YAML represtation of an object at Dump level.
Error message.
Errorf is a formatted Error message.
Errorv prints value in a k:v fromat.
Errorvb prints value in a k:v fromat with the value on a new line.
Errory prints the YAML represtation of an object at Error level.
Fatal logs Error message then exits with code 1.
Fatalf message logs formatted Error then exits with code 1.
Fatalv prints values in a k:v fromat and then exists with code 1.
Fataly prints the YAML represtation of an object at Error level then exits with code 1.
Info message.
Infof is a formatted Info message.
Infov prints value in a k:v fromat.
Infovb prints value in a k:v fromat with the value on a new line.
Infoy prints the YAML represtation of an object at Info level.
MarshalJSON marshals either a proto message or any other interface.
NewLogger is a new logger.
PrintYAML prints the YAML string of an object and has support for proto messages.
SPrintYAML returns a YAML string for an object and has support for proto messages.
Success message.
Successf is a formatted Success message.
Successv prints value in a k:v fromat.
Successvb prints value in a k:v fromat with the value on a new line.
Successy prints the YAML represtation of an object at Success level.
Warning message.
Warningf is a formatted Warning message.
Warningv prints value in a k:v fromat.
Warningvb prints value in a k:v fromat with the value on a new line.
Warningy prints the YAML represtation of an object at Warning level.
# Constants
DebugLabel is a label for a debug message.
DebugLevel logging.
DumpLabel is a label for a dump message.
DumpLevel logging.
ErrorLabel is a label for a Error message.
ErrorLevel logging.
InfoLabel is a label for an informative message.
InfoLevel logging.
SuccessLabel is a label for a success message.
WarningLabel is a label for a warning message.
WarningLevel logging.
# Variables
Color should be enabled for logs.
DefaultLogger is the default logger.
GlobalLevel to log at.
TestMode is enabled.
Timestamps should be printed.
# Type aliases
Level is a log level.