Skip to content

Commit 8ea1401

Browse files
authored
Fix to use trace for verbose debug logs
Closes GH-91. Closes GH-92. Reviewed-by: Titus Wormer <[email protected]>
1 parent e3410bf commit 8ea1401

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ The following bash scripts are useful when working on this project:
250250
```
251251
* run examples:
252252
```sh
253-
RUST_BACKTRACE=1 RUST_LOG=debug cargo run --features log --example lib
253+
RUST_BACKTRACE=1 RUST_LOG=trace cargo run --features log --example lib
254254
```
255255
* format:
256256
```sh

src/tokenizer.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ impl<'a> Tokenizer<'a> {
411411
let info = (point.index, point.vs);
412412

413413
#[cfg(feature = "log")]
414-
log::debug!("position: define skip: {:?} -> ({:?})", point.line, info);
414+
log::trace!("position: define skip: {:?} -> ({:?})", point.line, info);
415415

416416
let at = point.line - self.first_line;
417417

@@ -485,7 +485,7 @@ impl<'a> Tokenizer<'a> {
485485
self.account_for_potential_skip();
486486

487487
#[cfg(feature = "log")]
488-
log::debug!("position: after eol: `{:?}`", self.point);
488+
log::trace!("position: after eol: `{:?}`", self.point);
489489
} else {
490490
self.point.column += 1;
491491
}
@@ -722,7 +722,7 @@ fn push_impl(
722722
};
723723

724724
#[cfg(feature = "log")]
725-
log::debug!("attempt: `{:?}` -> `{:?}`", state, next);
725+
log::trace!("attempt: `{:?}` -> `{:?}`", state, next);
726726

727727
state = next;
728728
} else {
@@ -751,15 +751,15 @@ fn push_impl(
751751
};
752752

753753
#[cfg(feature = "log")]
754-
log::debug!("feed: {} to {:?}", format_byte_opt(byte), name);
754+
log::trace!("feed: {} to {:?}", format_byte_opt(byte), name);
755755

756756
tokenizer.expect(byte);
757757
state = call(tokenizer, name);
758758
};
759759
}
760760
State::Retry(name) => {
761761
#[cfg(feature = "log")]
762-
log::debug!("retry: `{:?}`", name);
762+
log::trace!("retry: `{:?}`", name);
763763

764764
state = call(tokenizer, name);
765765
}

0 commit comments

Comments
 (0)