diff --git a/vendored/sqlite3-parser/src/lexer/scan.rs b/vendored/sqlite3-parser/src/lexer/scan.rs index 7b280df9e9..47f9703f90 100644 --- a/vendored/sqlite3-parser/src/lexer/scan.rs +++ b/vendored/sqlite3-parser/src/lexer/scan.rs @@ -1,6 +1,6 @@ //! Adaptation/port of [Go scanner](http://tip.golang.org/pkg/bufio/#Scanner). -use log::debug; +use log::trace; use std::error::Error; use std::fmt; @@ -106,7 +106,7 @@ impl Scanner { &mut self, input: &'input [u8], ) -> ScanResult<'input, S::TokenType, S::Error> { - debug!(target: "scanner", "scan(line: {}, column: {})", self.line, self.column); + trace!(target: "scanner", "scan(line: {}, column: {})", self.line, self.column); // Loop until we have a token. loop { // See if we can get a token with what we already have. @@ -140,7 +140,7 @@ impl Scanner { /// Consume `amt` bytes of the buffer. fn consume(&mut self, data: &[u8], amt: usize) { - debug!(target: "scanner", "consume({})", amt); + trace!(target: "scanner", "consume({})", amt); debug_assert!(amt <= data.len()); for byte in &data[..amt] { if *byte == b'\n' { diff --git a/vendored/sqlite3-parser/src/parser/parse.y b/vendored/sqlite3-parser/src/parser/parse.y index 6f485d8642..8cd4192788 100644 --- a/vendored/sqlite3-parser/src/parser/parse.y +++ b/vendored/sqlite3-parser/src/parser/parse.y @@ -64,7 +64,7 @@ use crate::parser::ast::*; use crate::parser::{Context, ParserError}; use crate::dialect::{from_token, Token, TokenType}; -use log::{debug, error, log_enabled}; +use log::{trace, error, log_enabled}; #[allow(non_camel_case_types)] type sqlite3ParserError = crate::parser::ParserError; diff --git a/vendored/sqlite3-parser/third_party/lemon/lempar.rs b/vendored/sqlite3-parser/third_party/lemon/lempar.rs index 83cb246130..1e72cd19dc 100644 --- a/vendored/sqlite3-parser/third_party/lemon/lempar.rs +++ b/vendored/sqlite3-parser/third_party/lemon/lempar.rs @@ -298,7 +298,7 @@ impl yyParser<'_> { self.yystack.reserve(additional); #[cfg(not(feature = "NDEBUG"))] { - debug!( + trace!( target: TARGET, "Stack grows from {} to {} entries.", capacity, @@ -345,7 +345,7 @@ impl yyParser<'_> { //assert_eq!(self.yyidx+1, self.yystack.len()); #[cfg(not(feature = "NDEBUG"))] { - debug!( + trace!( target: TARGET, "Popping {}", yyTokenName[yytos.major as usize] ); @@ -453,7 +453,7 @@ fn yy_find_shift_action( if iFallback != 0 { #[cfg(not(feature = "NDEBUG"))] { - debug!( + trace!( target: TARGET, "FALLBACK {} => {}", yyTokenName[iLookAhead as usize], @@ -470,7 +470,7 @@ fn yy_find_shift_action( if yy_lookahead[j] == YYWILDCARD && iLookAhead > 0 { #[cfg(not(feature = "NDEBUG"))] { - debug!( + trace!( target: TARGET, "WILDCARD {} => {}", yyTokenName[iLookAhead as usize], @@ -548,12 +548,12 @@ impl yyParser<'_> { { let yytos = &self[0]; if yyNewState < YYNSTATE { - debug!( + trace!( target: TARGET, "{} '{}', go to state {}", zTag, yyTokenName[yytos.major as usize], yyNewState ); } else { - debug!( + trace!( target: TARGET, "{} '{}', pending reduce {:?}", zTag, @@ -709,7 +709,7 @@ impl yyParser<'_> { fn yy_accept(&mut self) { #[cfg(not(feature = "NDEBUG"))] { - debug!(target: TARGET, "Accept!"); + trace!(target: TARGET, "Accept!"); } if cfg!(not(feature = "YYNOERRORRECOVERY")) { self.yyerrcnt = -1; @@ -764,12 +764,12 @@ impl yyParser<'_> { #[cfg(not(feature = "NDEBUG"))] { if yyact < YY_MIN_REDUCE { - debug!( + trace!( target: TARGET, "Input '{}' in state {}", yyTokenName[yymajor as usize], yyact ); } else { - debug!( + trace!( target: TARGET, "Input '{}' with pending reduce {}", yyTokenName[yymajor as usize], @@ -793,7 +793,7 @@ impl yyParser<'_> { " without external action" }; if yysize != 0 { - debug!( + trace!( target: TARGET, "Reduce {} [{}]{}, pop back to state {}.", yyruleno, @@ -802,7 +802,7 @@ impl yyParser<'_> { self[yysize].stateno ); } else { - debug!( + trace!( target: TARGET, "Reduce {} [{}]{}.", yyruleno, yyRuleName[yyruleno as usize], action ); @@ -832,7 +832,7 @@ impl yyParser<'_> { assert_eq!(yyact, YY_ERROR_ACTION); #[cfg(not(feature = "NDEBUG"))] { - debug!(target: TARGET, "Syntax Error!"); + trace!(target: TARGET, "Syntax Error!"); } if YYERRORSYMBOL > 0 { /* A syntax error has occurred. @@ -861,7 +861,7 @@ impl yyParser<'_> { if yymx == YYERRORSYMBOL || yyerrorhit { #[cfg(not(feature = "NDEBUG"))] { - debug!( + trace!( target: TARGET, "Discard input token {}", yyTokenName[yymajor as usize] ); @@ -937,7 +937,7 @@ impl yyParser<'_> { .map(|entry| yyTokenName[entry.major as usize]) .collect::>() .join(" "); - debug!(target: TARGET, "Return. Stack=[{}]", msg); + trace!(target: TARGET, "Return. Stack=[{}]", msg); } } return Ok(());