Skip to content

Commit

Permalink
sqlite3-parser: Use trace-level logging for syntax errors
Browse files Browse the repository at this point in the history
Spamming the error logs for syntax errors is not nice for a library...
  • Loading branch information
penberg committed Jan 5, 2025
1 parent 2cd3c47 commit 3bfc4ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vendored/sqlite3-parser/src/parser/parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
//
%syntax_error {
if TokenType::TK_EOF as YYCODETYPE == yymajor {
error!(target: TARGET, "incomplete input");
trace!(target: TARGET, "incomplete input");
self.ctx.error = Some(ParserError::UnexpectedEof);
} else {
error!(target: TARGET, "near \"{:?}\": syntax error", yyminor);
trace!(target: TARGET, "near \"{:?}\": syntax error", yyminor);
self.ctx.error = Some(ParserError::SyntaxError(from_bytes(yyminor.1)));
}
}
Expand All @@ -59,7 +59,7 @@ use crate::parser::ast::*;
use crate::parser::{Context, ParserError};
use crate::dialect::{from_bytes, from_token, Token, TokenType};
use indexmap::IndexMap;
use log::error;
use log::trace;

#[expect(non_camel_case_types)]
type sqlite3ParserError = crate::parser::ParserError;
Expand Down

0 comments on commit 3bfc4ce

Please sign in to comment.