mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 16:06:30 +03:00
Introduce a flag debug_logging on the core
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user