Documentation
¶
Index ¶
- type Config
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(msg string, args ...interface{})
- func (l *Logger) DebugWithPrefix(prefix string, msg string, args ...interface{})
- func (l *Logger) Error(msg string, args ...interface{})
- func (l *Logger) ErrorWithPrefix(prefix string, msg string, args ...interface{})
- func (l *Logger) Info(msg string, args ...interface{})
- func (l *Logger) InfoWithPrefix(prefix string, msg string, args ...interface{})
- func (l *Logger) Warning(msg string, args ...interface{})
- func (l *Logger) WarningWithPrefix(prefix string, msg string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { FilePath string // Path to the log file PrintToConsole bool // Whether to print logs to the console }
Config holds the configuration for the Logger.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides logging functionality with optional file output and console printing.
func (*Logger) DebugWithPrefix ¶
DebugWithPrefix logs a message with a custom prefix at the DEBUG level.
func (*Logger) ErrorWithPrefix ¶
ErrorWithPrefix logs a message with a custom prefix at the ERROR level.
func (*Logger) InfoWithPrefix ¶
InfoWithPrefix logs a message with a custom prefix at the INFO level.
func (*Logger) WarningWithPrefix ¶
WarningWithPrefix logs a message with a custom prefix at the WARNING level.
Click to show internal directories.
Click to hide internal directories.