diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-01-25 19:23:07 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-01-25 19:23:07 +0200 |
commit | ca160fd27a31a030191055409d02fd7739a50179 (patch) | |
tree | 466e7a1cf364f038c72de710f8864f56b321d4e3 | |
parent | 528a4c1e20c2b9b8ecf451af72c77ae36e4f95b5 (diff) | |
download | riki-ca160fd27a31a030191055409d02fd7739a50179.tar.gz |
feat: lower some log messages from debug to trace for easier debug
Sponsored-by: author
-rw-r--r-- | src/parser.rs | 6 | ||||
-rw-r--r-- | src/token.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/parser.rs b/src/parser.rs index 5e8238e..48e1a58 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,7 +1,7 @@ use crate::token::{TokenKind, TokenParser, TokenPatterns}; use crate::wikitext::{ParsedDirective, Snippet, WikiLink, WikitextError}; use line_col::LineColLookup; -use log::{debug, trace}; +use log::trace; use std::collections::HashMap; #[derive(Debug, thiserror::Error)] @@ -34,7 +34,7 @@ impl WikitextParser { let mut positions = vec![]; loop { let token = p.parse(); - debug!("token {:?}", token); + trace!("token {:?}", token); if token.token == TokenKind::End { break; } @@ -65,7 +65,7 @@ impl WikitextParser { } let (line, col) = self.position(); - debug!("token at {}:{}", line, col); + trace!("token at {}:{}", line, col); let snippet = match &self.tokens[..] { [TokenKind::OpenBrackets, TokenKind::Word(target), TokenKind::CloseBrackets, ..] => { let wikilink = WikiLink::new(target, target); diff --git a/src/token.rs b/src/token.rs index c1d2abc..a290366 100644 --- a/src/token.rs +++ b/src/token.rs @@ -1,4 +1,4 @@ -use log::debug; +use log::trace; use regex::Regex; #[derive(Debug, Clone, Eq, PartialEq)] @@ -9,7 +9,7 @@ pub struct Token { impl Token { fn new(token: TokenKind, pos: usize) -> Self { - debug!("Token: token={:?} pos={}", token, pos); + trace!("Token: token={:?} pos={}", token, pos); Self { token, pos } } } |