Skip to main content

AFS_AETHER_LOG_ROTATION_MAX_BYTES

Deep-dive reference for:

  • AFS_AETHER_LOG_ROTATION_MAX_BYTES

Status

  • active

Audience

  • production/user

Type and Default

  • Type: unsigned integer bytes (u64), must be > 0.
  • Default behavior:
    • If size rotation is active and no explicit value is set: 50 * 1024 * 1024 (50 MiB).
    • If rotation mode is not size and this var is unset: no effect.

What It Does

Sets the size threshold (in bytes) for size-based log rotation.

In size mode, rollover happens when:

  • current_file_size + next_write > max_bytes

Input Surface

  • Env: AFS_AETHER_LOG_ROTATION_MAX_BYTES=<bytes>

There is currently no dedicated CLI flag for this setting.

Interaction With Rotation Mode

  • If current rotation mode is already size, this updates only max_bytes.
  • If current rotation mode is not size, setting this variable switches effective mode to size and keeps max_files at the default (5) unless separately overridden.

Interaction With Destination

This threshold is only used when:

  • AFS_AETHER_LOG_DESTINATION=file
  • effective rotation mode is size

If destination is stdout/stderr, the value is loaded but not used by the active writer.

Validation

  • Parse errors fail config load.
  • 0 is rejected with:
    • value must be greater than zero

Reload Behavior (SIGHUP)

Because this value is part of log_rotation, changes are detected but not hot-applied. Restart is required for new thresholds to take effect.

Examples

  • Set 100 MiB threshold:
    • AFS_AETHER_LOG_DESTINATION=file AFS_AETHER_LOG_ROTATION_MAX_BYTES=104857600 aether mount --session-id s1 --mount-dir /mnt/aether
  • Set 10 MiB threshold with explicit archive count:
    • AFS_AETHER_LOG_DESTINATION=file AFS_AETHER_LOG_ROTATION_MAX_BYTES=10485760 AFS_AETHER_LOG_ROTATION_MAX_FILES=3 aether mount --session-id s1 --mount-dir /mnt/aether
  • AFS_AETHER_LOG_ROTATION
  • AFS_AETHER_LOG_ROTATION_MAX_FILES
  • AFS_AETHER_LOG_DESTINATION
  • AFS_AETHER_LOG_PATH

Primary Implementation Sources

  • packages/aether/src/config/types/apply_env.rs
  • packages/aether/src/config/types/model_defaults.rs
  • packages/aether/src/observability/logging.rs
  • packages/aether/src/config/reload.rs