summaryrefslogtreecommitdiffhomepage
path: root/src/log.rs
Commit message (Collapse)AuthorAgeFilesLines
* log: add splash! macro and centralize no-splash handlingdilluti0n2025-09-071-4/+19
| | | | | | | | | | | | | * Introduce: `splash!` macro in `log.rs` to print startup messages conditionally, based on `--no-splash` flag. * Move: `NO_SPLASH` management into `log.rs` with helper functions: (`set_no_splash`, `no_splash`). * Remove: old `splash()` function in `main.rs` and replace with `splash!` macro usage. * Set: default `LogLevel` according to build profile (Debug → Debug, Release → Warning). * Print: unified startup messages across Linux and Windows, including `MESSAGE_AT_RUN`.
* Update copyright notices to notice email instead of github linkdilluti0n2025-09-051-1/+1
|
* Add license document and copyright notice headersdilluti0n2025-09-051-0/+17
|
* log: update error messagedilluti0n2025-09-051-1/+1
|
* Add flag --loglevel to set loglevel on runtimedilluti0n2025-09-031-7/+41
| | | | | | | | | | | | | | | * Introduce: `DEFAULT_LOG_LEVEL` and `LOG_LEVEL_OVERRIDE` (OnceLock) in log.rs. * Add: `set_log_level()` and `current_log_level()`; gate defaults by `debug_assertions`. * Implement: `FromStr` for `LogLevel` with a proper error type (`ParseLogLevelError`). * Update: `log_println!` to respect `current_log_level()` and use `format_args!`. * Extend: CLI: `--loglevel <debug|info|warning|error>` and reflect it in `usage()`. * Replace: ad-hoc prints with `log_println!` and plumb parsed level into `set_log_level`.
* Tidy up LogLevel enum definitiondilluti0n2025-09-031-3/+1
| | | | | | * Remove: unused `Fatal` variant from `LogLevel`. * Update: comment on `Error` to indicate it represents unrecoverable errors.
* Use log.rs for conditional logging and centralized error reportingdilluti0n2025-09-031-0/+5
| | | | | | | | | * Set: `LOG_LEVEL` to `Debug` in debug builds and `Warning` in release builds via `#[cfg(debug_assertions)]`. * Replace: direct `println!` calls with `log_println!` for packet handling, warning messages, and argument parsing errors. * Ensures: consistent log formatting and respects the global log level configuration across the codebase.
* Implement log.rs; log level handlingdilluti0n2025-09-031-0/+34