Skip to content
Extraits de code Groupes Projets
Vérifiée Valider fdcef20c rédigé par Kubat's avatar Kubat
Parcourir les fichiers

RUST: Logging in the Rust source files must use the 'target' field to add a section in logging...

parent 9b6dce3f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter