Introduce a flag debug_logging on the core

This commit is contained in:
Hocuri
2022-05-09 15:34:16 +02:00
committed by Septias
parent fc30bbbe4f
commit 2fdab88d19
4 changed files with 53 additions and 37 deletions

View File

@@ -4,6 +4,7 @@ use std::collections::{HashMap, HashSet};
use std::convert::TryFrom;
use std::path::Path;
use std::path::PathBuf;
use std::sync::atomic;
use std::time::Duration;
use anyhow::{bail, Context as _, Result};
@@ -341,6 +342,12 @@ impl Sql {
} else {
info!(context, "Opened database {:?}.", self.dbfile);
*self.is_encrypted.write().await = Some(passphrase_nonempty);
let debug_logging = self.get_raw_config_u32(Config::DebugLogging).await?;
context
.debug_logging
.store(debug_logging.unwrap_or(0), atomic::Ordering::Release);
Ok(())
}
}