From fdcef20c53cc7518cd714e724e48af95a49edd28 Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Sun, 11 Dec 2022 19:35:00 +0100 Subject: [PATCH] RUST: Logging in the Rust source files must use the 'target' field to add a section in logging... --- src/rust/liblektor-rs/lektor_unsafe/src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rust/liblektor-rs/lektor_unsafe/src/db.rs b/src/rust/liblektor-rs/lektor_unsafe/src/db.rs index 32cb3bda..bc2e8f7a 100644 --- a/src/rust/liblektor-rs/lektor_unsafe/src/db.rs +++ b/src/rust/liblektor-rs/lektor_unsafe/src/db.rs @@ -24,7 +24,7 @@ pub unsafe extern "C" fn lkt_database_establish_connection( match LktDatabaseConnection::try_new(PathBuf::from(&path[..])) { Ok(db) => Box::leak(Box::new(db)) as *mut _, Err(err) => { - error!("failed to establish connexion to {}: {err}", &path[..]); + error!(target: "DB", "failed to establish connexion to {}: {err}", &path[..]); std::ptr::null_mut() } } @@ -40,7 +40,7 @@ pub unsafe extern "C" fn lkt_database_establish_connection( #[no_mangle] pub unsafe extern "C" fn lkt_database_close_connection(db: *mut LktDatabaseConnection) { if db.is_null() { - error!("can't clost a connexion to a null database!") + error!(target: "DB", "can't clost a connexion to a null database!") } else { let db = Box::from_raw(db); drop(db); -- GitLab