AFS_AETHER_LOG_FORMAT
Deep-dive reference for:
AFS_AETHER_LOG_FORMAT
Status
active
Audience
production/user
Type and Default
- Type: string enum (
LogFormat). - Accepted values:
json,text(case-insensitive in env input). - Default:
json.
What It Does
Controls the output structure of Aether log events.
json:- emits one JSON object per log line
- includes structured keys like level/target/component plus event fields
text:- emits human-readable single-line logs with key/value fields
Input Surfaces
- Env:
AFS_AETHER_LOG_FORMAT=<json|text> - Config file (
aether.toml):[logging]
format = "json"
There is currently no dedicated CLI flag for log format.
Resolution and Override Order
- Built-in default (
json) aether.toml([logging].format)- Environment (
AFS_AETHER_LOG_FORMAT)
Format Semantics
json format:
- Serializes each event as JSON.
- Adds standard keys including timestamp (when enabled), level, target, component, trace_id, and session_id, plus event fields.
text format:
- Renders level/component/target followed by message and key/value fields.
- Includes session_id from the event or configured session context when available.
ANSI Color Interaction
- ANSI/color output is only enabled for
textformat. - For
json, ANSI is disabled regardless of CLI color setting.
Reload Behavior (SIGHUP)
log_format changes are detected on config reload, but are not hot-applied.
The process logs a restart-required warning; format changes take effect after restart.
Validation
- Invalid env values fail config load with:
expected one of text, json
- Invalid config values fail TOML enum deserialization.
Examples
- JSON logs (recommended for ingestion):
AFS_AETHER_LOG_FORMAT=json aether mount --session-id s1 --mount-dir /mnt/aether
- Text logs (human-readable):
AFS_AETHER_LOG_FORMAT=text aether mount --session-id s1 --mount-dir /mnt/aether
Related Variables
AFS_AETHER_LOGAFS_AETHER_LOG_DESTINATIONAFS_AETHER_LOG_PATHAFS_AETHER_LOG_REDACTAFS_AETHER_LOG_SAMPLE_PREFETCHAFS_AETHER_LOG_SAMPLE_INVALIDATION
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/observability/logging.rspackages/aether/src/config/reload.rspackages/aether-cli/src/app/dispatch_and_runtime.rs