parent
6c40c672c8
commit
331e5a7d7b
23
logger.go
23
logger.go
|
@ -219,6 +219,8 @@ func GetGlobalLogger() *Logger {
|
|||
return &dLogger
|
||||
}
|
||||
|
||||
// Global available methods per logging levels //
|
||||
|
||||
func Trace(message string, parameters ...any) {
|
||||
dLogger.Log(LevelTrace, message, parameters...)
|
||||
}
|
||||
|
@ -238,6 +240,27 @@ func Fatal(message string, parameters ...any) {
|
|||
dLogger.Log(LevelFatal, message, parameters...)
|
||||
}
|
||||
|
||||
// Available methods for each logger per logging level //
|
||||
|
||||
func (l Logger) Trace(message string, parameters ...any) {
|
||||
l.Log(LevelTrace, message, parameters...)
|
||||
}
|
||||
func (l Logger) Debug(message string, parameters ...any) {
|
||||
l.Log(LevelDebug, message, parameters...)
|
||||
}
|
||||
func (l Logger) Info(message string, parameters ...any) {
|
||||
l.Log(LevelInfo, message, parameters...)
|
||||
}
|
||||
func (l Logger) Warning(message string, parameters ...any) {
|
||||
l.Log(LevelWarning, message, parameters...)
|
||||
}
|
||||
func (l Logger) Error(message string, parameters ...any) {
|
||||
l.Log(LevelError, message, parameters...)
|
||||
}
|
||||
func (l Logger) Fatal(message string, parameters ...any) {
|
||||
l.Log(LevelFatal, message, parameters...)
|
||||
}
|
||||
|
||||
// CloseFile closes the underlaying file to which the logger messages are written.
|
||||
func CloseFile() {
|
||||
dLogger.CloseFile()
|
||||
|
|
Loading…
Reference in New Issue