Documentation
¶
Overview ¶
Package logger provides optional file-based logging for gemtracker.
When verbose mode is enabled, logs are written to ~/.cache/gemtracker/gemtracker.log. When disabled, uses io.Discard for zero overhead. All logging functions are thread-safe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close() error
Close closes the log file if one was opened. Should be called via defer in main(). Returns an error if the file cannot be closed. Safe to call if logging is disabled.
func Error ¶
func Error(format string, v ...interface{})
Error logs an error message with [ERROR] prefix. Thread-safe. No-op if logger has not been initialized.
func Info ¶
func Info(format string, v ...interface{})
Info logs an informational message with [INFO] prefix. Thread-safe. No-op if logger has not been initialized.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.