default to debug log level if using debug build

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-14 19:12:39 -04:00 committed by June
parent 878dcd71bb
commit 20efe437fb
2 changed files with 12 additions and 2 deletions

View file

@ -860,7 +860,14 @@ fn default_max_fetch_prev_events() -> u16 { 100_u16 }
fn default_trusted_servers() -> Vec<OwnedServerName> { vec![OwnedServerName::try_from("matrix.org").unwrap()] }
fn default_log() -> String { "warn,state_res=warn".to_owned() }
fn default_log() -> String {
// do debug logging by default for debug builds
if cfg!(debug_assertions) {
"debug".to_owned()
} else {
"warn,ruma_state_res=warn".to_owned()
}
}
fn default_notification_push_path() -> String { "/_matrix/push/v1/notify".to_owned() }