AFS_AETHER_LOG_ROTATION
Deep-dive reference for:
AFS_AETHER_LOG_ROTATION
Status
active
Audience
production/user
Type and Default
- Type: string enum (
LogRotation). - Accepted values:
none,hourly,daily,size(case-insensitive in env input). - Default:
none.
What It Does
Controls log-file rollover policy for Aether when file logging is enabled.
Rotation policy is applied only when AFS_AETHER_LOG_DESTINATION=file.
Input Surfaces
- Env:
AFS_AETHER_LOG_ROTATION=<none|hourly|daily|size> - Config file (
aether.toml):[logging] rotation = ...(same enum semantics)
There is currently no dedicated CLI flag for log rotation mode.
Resolution and Override Order
- Built-in default (
none) aether.toml([logging].rotation)- Environment (
AFS_AETHER_LOG_ROTATION)
Mode Semantics
none:- append to the active log file indefinitely.
hourly:- time-based rolling file appender with hourly rollover.
daily:- time-based rolling file appender with daily rollover.
size:- custom size-based rotation.
- active file rolls when
current_size + write > max_bytes. - archives are renamed with numeric suffixes (
.1,.2, ...), keeping up tomax_files.
Size-Mode Defaults and Related Knobs
When mode is size and limits are not explicitly set, defaults are:
max_bytes = 50 * 1024 * 1024(50 MiB)max_files = 5
Related variables:
AFS_AETHER_LOG_ROTATION_MAX_BYTESAFS_AETHER_LOG_ROTATION_MAX_FILES
Setting either of those also forces effective mode to size if current mode is not size.
Interaction With Destination
- If destination is
stdoutorstderr, rotation settings are loaded in config but not used by the active writer. - Rotation behavior is only active for file destination.
Validation
- Invalid mode value fails config load with:
unknown rotation mode '<value>'
- For size mode,
max_bytesandmax_filesmust be greater than zero.
Reload Behavior (SIGHUP)
log_rotation changes are detected on config reload, but are not hot-applied.
The process logs a restart-required warning; rotation changes take effect after restart.
Examples
- Disable rotation:
AFS_AETHER_LOG_DESTINATION=file AFS_AETHER_LOG_ROTATION=none aether mount --session-id s1 --mount-dir /mnt/aether
- Daily rotation:
AFS_AETHER_LOG_DESTINATION=file AFS_AETHER_LOG_ROTATION=daily aether mount --session-id s1 --mount-dir /mnt/aether
- Size rotation with explicit limits:
AFS_AETHER_LOG_DESTINATION=file AFS_AETHER_LOG_ROTATION=size AFS_AETHER_LOG_ROTATION_MAX_BYTES=104857600 AFS_AETHER_LOG_ROTATION_MAX_FILES=10 aether mount --session-id s1 --mount-dir /mnt/aether
Related Variables
AFS_AETHER_LOG_DESTINATIONAFS_AETHER_LOG_PATHAFS_AETHER_LOG_ROTATION_MAX_BYTESAFS_AETHER_LOG_ROTATION_MAX_FILES
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/config/types/config_resolution.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/observability/logging.rspackages/aether/src/config/reload.rs