Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultLogFilePath ¶
func GetDefaultLogFilePath() string
GetDefaultLogFilePath returns the default log file path
Types ¶
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger implements slog.Handler to write logs to a file
func NewFileLogger ¶
func NewFileLogger(filePath string, level slog.Level, opts *slog.HandlerOptions) (*FileLogger, error)
NewFileLogger creates a new handler that writes logs to the specified file path If the file exists, it will append to it
Click to show internal directories.
Click to hide internal directories.