Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to use trace for verbose debug logs #92

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ The following bash scripts are useful when working on this project:
```
* run examples:
```sh
RUST_BACKTRACE=1 RUST_LOG=debug cargo run --features log --example lib
RUST_BACKTRACE=1 RUST_LOG=trace cargo run --features log --example lib
```
* format:
```sh
Expand Down
10 changes: 5 additions & 5 deletions src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl<'a> Tokenizer<'a> {
let info = (point.index, point.vs);

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

let at = point.line - self.first_line;

Expand Down Expand Up @@ -485,7 +485,7 @@ impl<'a> Tokenizer<'a> {
self.account_for_potential_skip();

#[cfg(feature = "log")]
log::debug!("position: after eol: `{:?}`", self.point);
log::trace!("position: after eol: `{:?}`", self.point);
} else {
self.point.column += 1;
}
Expand Down Expand Up @@ -722,7 +722,7 @@ fn push_impl(
};

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

state = next;
} else {
Expand Down Expand Up @@ -751,15 +751,15 @@ fn push_impl(
};

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

tokenizer.expect(byte);
state = call(tokenizer, name);
};
}
State::Retry(name) => {
#[cfg(feature = "log")]
log::debug!("retry: `{:?}`", name);
log::trace!("retry: `{:?}`", name);

state = call(tokenizer, name);
}
Expand Down
Loading