Documentation ¶
Overview ¶
Package log provides a simple and flexible logging library with various log levels.
Index ¶
- func AuditLn(correlationId *string, v ...any)
- func DebugLn(correlationId *string, v ...any)
- func ErrorLn(correlationId *string, v ...any)
- func FatalLn(correlationId *string, v ...any)
- func InfoLn(correlationId *string, v ...any)
- func SetLevel(l Level)
- func TraceLn(correlationId *string, v ...any)
- func WarnLn(correlationId *string, v ...any)
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditLn ¶ added in v0.15.7
AuditLn logs an audit message with the provided correlationId and message arguments. Audit messages are always logged, regardless of the current log level.
func DebugLn ¶
DebugLn logs a debug message with the provided correlationId and message arguments if the current log level is Debug or lower.
func ErrorLn ¶
ErrorLn logs an error message with the provided correlationId and message arguments if the current log level is Error or lower.
func FatalLn ¶
FatalLn logs a fatal message with the provided correlationId and message arguments. The application will exit after the message is logged.
func InfoLn ¶
InfoLn logs an informational message with the provided correlationId and message arguments if the current log level is Info or lower.
func SetLevel ¶
func SetLevel(l Level)
SetLevel sets the global log level to the provided level.
The log level is only updated if the provided level is valid (Off, Fatal, Error, Warn, Info, Audit, Debug, or Trace).