package
Version:
v0.25.2
Opens a new window with list of versions in this module.
Published: Oct 29, 2023
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Log is logging client.
New to create new logging client.
Color is not working in json format.
func (l *Log) Debug(str string, args ...interface{})
Debug to print debug log.
func (l *Log) Error(str string, args ...interface{})
Error to print error log.
func (l *Log) Fatal(str string, args ...interface{})
Fatal to print fatal log.
Will exit the program when called.
func (l *Log) Info(str string, args ...interface{})
Info to print info log.
func (l *Log) Log(fields map[string]interface{})
Log to print general log.
Key `level` can be used to differentiate
log level.
func (l *Log) Panic(str string, args ...interface{})
Panic to print panic log.
Will print panic error stack and exit
like panic().
func (l *Log) Trace(str string, args ...interface{})
Trace to print trace log.
func (l *Log) Warn(str string, args ...interface{})
Warn to print warn log.
LogLevel is level of log that will be printed.
Will print level that is higher than your
chosen one.
const (
TraceLevel LogLevel = iota - 1
DebugLevel
InfoLevel
WarnLevel
ErrorLevel
FatalLevel
PanicLevel
Disabled
)
Available log level.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.