Documentation
¶
Overview ¶
internal/logging/logging.go
Index ¶
- Constants
- func Cleanup()
- func CloseServiceLogFile() error
- func GetActionLogs(since time.Duration) ([]string, error)
- func GetLogPaths() (service, action string)
- func GetServiceLogFile() (*os.File, error)
- func GetServiceLogs(since time.Duration) ([]string, error)
- func Init() error
- func LogAction(action, details string)
- func LogService(message string)
- func RotateLogs() error
- type Config
Constants ¶
View Source
const ( // Default log settings if env vars are not set DefaultLogDir = "/tmp/log/nanodns" DefaultServiceLog = "service.log" DefaultActionLog = "actions.log" DefaultMaxLogSize = 10 * 1024 * 1024 // 10MB DefaultMaxLogBackups = 5 )
Configuration constants with default values
Variables ¶
This section is empty.
Functions ¶
func CloseServiceLogFile ¶
func CloseServiceLogFile() error
CloseServiceLogFile closes the service log file if it's open
func GetActionLogs ¶
GetActionLogs retrieves action logs with optional filtering
func GetLogPaths ¶
func GetLogPaths() (service, action string)
GetLogPaths returns the current log file paths
func GetServiceLogFile ¶
func GetServiceLogs ¶
GetServiceLogs retrieves service logs with optional filtering
Types ¶
Click to show internal directories.
Click to hide internal directories.