LemonCore. Config. Logging
(lemon_core v0.1.0)
View Source
Logging configuration for file output and log levels.
Inspired by Ironclaw's modular config pattern, this module handles logging-specific configuration including log file paths, levels, rotation settings, and compression options.
Configuration
Configuration is loaded from the TOML config file under [logging]:
[logging]
file = "./logs/lemon.log"
level = "debug"
max_no_bytes = 10485760
max_no_files = 5
compress_on_rotate = true
filesync_repeat_interval = 5000Environment variables override file configuration:
LEMON_LOG_FILELEMON_LOG_LEVEL
Summary
Functions
Returns the default logging configuration as a map.
Resolves logging configuration from settings and environment variables.
Types
@type log_level() :: :debug | :info | :warning | :error | nil
Functions
@spec defaults() :: map()
Returns the default logging configuration as a map.
This is used as the base configuration that gets overridden by user settings.
Resolves logging configuration from settings and environment variables.
Priority: environment variables > TOML config > defaults