Documentation
¶
Overview ¶
Multiple Logs GitHub repository: ¶
https://github.com/takecontrolsoft/go_multi_log
Package "logger" ¶
This package provides functions for logging in multiple loggers (console, file and other).
It logs messages, objects and errors in different log levels: "Debug", "Trace", "Info", "Warning", "Error" and "Fatal".
More than one loggers could be registered at the same time.
This package provides implementations of loggers.ConsoleLogger and loggers.FileLogger.
Custom loggers could be also implemented using the loggers.LoggerInterface.
Take Control - software & infrastructure ¶
The package is created and maintained by "Take Control - software & infrastructure".
Web site: https://takecontrolsoft.eu
Index ¶
- func Debug(arg any)
- func DebugF(format string, args ...interface{})
- func DefaultLogger() loggers.LoggerInterface
- func Error(arg any)
- func ErrorF(format string, args ...interface{})
- func Fatal(arg any)
- func FatalF(format string, args ...interface{})
- func GetLogger(key string) loggers.LoggerInterface
- func Info(arg any)
- func InfoF(format string, args ...interface{})
- func RegisterLogger(key string, logger loggers.LoggerInterface) error
- func Trace(arg any)
- func TraceF(format string, args ...interface{})
- func UnregisterLogger(key string) error
- func Warning(arg any)
- func WarningF(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugF ¶
func DebugF(format string, args ...interface{})
Log objects using format string in Debug level.
func DefaultLogger ¶
func DefaultLogger() loggers.LoggerInterface
Return the default instance of loggers.ConsoleLogger.
func ErrorF ¶
func ErrorF(format string, args ...interface{})
Log objects using format string in Error level.
func FatalF ¶
func FatalF(format string, args ...interface{})
Log objects using format string in Fatal level and call Panic to exit.
func GetLogger ¶
func GetLogger(key string) loggers.LoggerInterface
Return a registered logger instance by key.
func InfoF ¶
func InfoF(format string, args ...interface{})
Log objects using format string in Info level.
func RegisterLogger ¶
func RegisterLogger(key string, logger loggers.LoggerInterface) error
Register an instance of an additional logger that implements loggers.LoggerInterface.
func TraceF ¶
func TraceF(format string, args ...interface{})
Log objects using format string in Trace level.
func UnregisterLogger ¶
Unregister an instance of logger by key.
Types ¶
This section is empty.