Documentation ¶
Index ¶
- Constants
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Debug(format string, a ...any)
- func (l *Logger) Debugln(a ...any)
- func (l *Logger) Error(format string, a ...any)
- func (l *Logger) Errorln(a ...any)
- func (l *Logger) SetLogFile(file *os.File)
- func (l *Logger) SetLogLevel(level int)
- func (l *Logger) Warn(format string, a ...any)
Constants ¶
View Source
const ( // For unrecoverable errors where you would be unable to continue the current scope of code. LogError int = iota // For non-critical errors that do not require you to abort/exit from the current scope of code. LogWarn // For any type of verbose debug specific logging. LogDebug )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
func NewLoggerWithLevel ¶
Returns a new logger with the specified log level set, panicking if the log level is invalid.
func (*Logger) Close ¶
func (l *Logger) Close()
Sets the given logging level, panicking if the log level is invalid.
func (*Logger) SetLogFile ¶
Sets the given logging level, panicking if the log level is invalid.
func (*Logger) SetLogLevel ¶
Sets the given logging level, panicking if the log level is invalid.
Click to show internal directories.
Click to hide internal directories.