bark: bound debug log disk usage
Solves bark#1384
File logs currently grow without a size limit. This adds automatic rotation for bark and barkd, using a 100 MiB threshold and retaining five archives by default. Rotations assign increasing archive numbers: the lowest retained number is oldest and the highest is newest. Old archives are deleted when the retention count is exceeded, rather than renaming the remaining archives.
Writers coordinate through a shared lock for the log path. Interrupted rotations can resume, and wallet cleanup preserves log files and their rotation metadata. If rotation fails, logging continues in the available file and reports a warning. The threshold is therefore not a strict disk quota.
The rotation threshold and archive count can be configured with --log-max-size (BARK_LOG_MAX_SIZE) and --log-archives (BARK_LOG_ARCHIVES). Both values must be at least 1. Lower archive counts take effect at the next rotation.
Also adds BARK_FILE_LOG to configure the file filter independently of the terminal filter. When unset, it falls back to BARK_LOG.
Validation
just checkspassed.- 727 unit tests passed; one skipped.
- Three logging integration tests passed.
- Manual CLI rotation with a small threshold verified increasing archive numbers and retention.