mirror of
https://github.com/domcyrus/rustnet.git
synced 2026-01-31 02:39:39 -06:00
set up logging level before privileges check (#143)
This commit is contained in:
@@ -22,8 +22,6 @@ fn main() -> Result<()> {
|
||||
// Parse command line arguments
|
||||
let matches = cli::build_cli().get_matches();
|
||||
|
||||
// Check privileges BEFORE initializing TUI (so error messages are visible)
|
||||
check_privileges_early()?;
|
||||
// Set up logging only if log-level was provided
|
||||
if let Some(log_level_str) = matches.get_one::<String>("log-level") {
|
||||
let log_level = log_level_str
|
||||
@@ -32,6 +30,9 @@ fn main() -> Result<()> {
|
||||
setup_logging(log_level)?;
|
||||
}
|
||||
|
||||
// Check privileges BEFORE initializing TUI (so error messages are visible)
|
||||
check_privileges_early()?;
|
||||
|
||||
info!("Starting RustNet Monitor");
|
||||
|
||||
// Build configuration from command line arguments
|
||||
|
||||
Reference in New Issue
Block a user