Documentation ¶
Index ¶
Constants ¶
View Source
const ( TraceLog = "TRACE" DebugLog = "DEBUG" InfoLog = "INFO" WarnLog = "WARN" ErrorLog = "ERROR" )
These constants identify the log levels in order of increasing severity.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // SetLogLevel sets minimum severity log level. If a logging method is called with a lower level of severity than // what is set, it will result in no output. SetLogLevel(logLevel string) error // LogLevel returns the current log level setting LogLevel() string // Debug logs a message at the DEBUG severity level Debug(msg string, args ...any) // Error logs a message at the ERROR severity level Error(msg string, args ...any) // Info logs a message at the INFO severity level Info(msg string, args ...any) // Trace logs a message at the TRACE severity level Trace(msg string, args ...any) // Warn logs a message at the WARN severity level Warn(msg string, args ...any) // Debugf logs a formatted message at the DEBUG severity level Debugf(msg string, args ...any) // Errorf logs a formatted message at the ERROR severity level Errorf(msg string, args ...any) // Infof logs a formatted message at the INFO severity level Infof(msg string, args ...any) // Tracef logs a formatted message at the TRACE severity level Tracef(msg string, args ...any) // Warnf logs a formatted message at the WARN severity level Warnf(msg string, args ...any) }
Logger defines the interface for logging operations.
Click to show internal directories.
Click to hide internal directories.