| 335 | } |
| 336 | |
| 337 | fn report_unusable(dir: &LogDir, error: &OpenError) { |
| 338 | match dir { |
| 339 | LogDir::Chosen(path) => tracing::warn!( |
| 340 | "ATOMIC_LOG_DIR {} is unusable ({error}); file logging is off for this command", |
| 341 | path.display() |
| 342 | ), |
| 343 | LogDir::Default(path) => tracing::debug!( |
| 344 | "log directory {} is unusable ({error}); file logging is off for this command", |
| 345 | path.display() |
| 346 | ), |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | fn prune_old_files(dir: &Path) { |
| 351 | let failures = retention::prune(dir, LOG_FILE_PREFIX, LOG_FILE_SUFFIX, KEPT_LOG_FILES); |