Refactor startup logging

Move all startup output (DC pings, proxy links) from println!() to
      info!() for consistent tracing format. Add reload::Layer so startup
      messages stay visible even in silent mode.
This commit is contained in:
Жора Змейкин
2026-02-12 05:14:23 +03:00
parent 364bc6e278
commit 9304d5256a
3 changed files with 2777 additions and 25 deletions

View File

@@ -43,7 +43,8 @@ pub enum LogLevel {
#[default]
Normal,
/// Minimal output: only warnings and errors (warn + error).
/// Proxy links are still printed to stdout via println!.
/// Startup messages (config, DC connectivity, proxy links) are always shown
/// via info! before the filter is applied.
Silent,
}
@@ -57,7 +58,7 @@ impl LogLevel {
LogLevel::Silent => "warn",
}
}
/// Parse from a loose string (CLI argument)
pub fn from_str_loose(s: &str) -> Self {
match s.to_lowercase().as_str() {