Skip to content

Commit 08cfbcb

Browse files
committed
Rename "priority" to "level" in log handling and update corresponding SQL test file
1 parent c3fcd7b commit 08cfbcb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/render.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,8 @@ fn handle_log_component(
915915
current_statement: Option<usize>,
916916
data: &JsonValue,
917917
) -> anyhow::Result<()> {
918-
let priority = get_object_str(data, "priority").unwrap_or("info");
919-
let log_level = log::Level::from_str(priority).with_context(|| "Invalid log priority value")?;
918+
let level_name = get_object_str(data, "level").unwrap_or("info");
919+
let log_level = log::Level::from_str(level_name).with_context(|| "Invalid log level value")?;
920920

921921
let mut target = format!("sqlpage::log from \"{}\"", source_path.display());
922922
if let Some(current_statement) = current_statement {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
select 'log' as component,
22
'Hello, World!' as message,
3-
'info' as priority;
3+
'info' as level;
44

55
select 'text' as component,
66
'It works !' as contents;

0 commit comments

Comments
 (0)