summaryrefslogtreecommitdiff
path: root/src/debug.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.rs')
-rw-r--r--src/debug.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/debug.rs b/src/debug.rs
index c01ee15..6270948 100644
--- a/src/debug.rs
+++ b/src/debug.rs
@@ -13,15 +13,17 @@ const BLUE: &str = "\x1b[34m";
pub struct DebugState {
pub enabled: bool,
+ pub verbose: bool,
last_cycle: usize,
last_mark: Instant,
symbols: DebugSymbols,
}
impl DebugState {
- pub fn new<P: AsRef<Path>>(enabled: bool, symbols_path: Option<P>) -> Self {
+ pub fn new<P: AsRef<Path>>(enabled: bool, verbose: bool, symbols_path: Option<P>) -> Self {
Self {
enabled,
+ verbose,
last_cycle: 0,
last_mark: Instant::now(),
symbols: DebugSymbols::from_path_opt(symbols_path),
@@ -29,7 +31,7 @@ impl DebugState {
}
pub fn info(&self, string: &str) {
- if self.enabled {
+ if self.verbose {
eprintln!("{BOLD}{BLUE}[INFO]{NORMAL}: {string}{NORMAL}");
}
}