default to debug log level if using debug build
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
878dcd71bb
commit
20efe437fb
2 changed files with 12 additions and 2 deletions
|
@ -270,7 +270,10 @@ allow_profile_lookup_federation_requests = true
|
||||||
|
|
||||||
# max log level for conduwuit. allows debug, info, warn, or error
|
# max log level for conduwuit. allows debug, info, warn, or error
|
||||||
# see also: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
|
# see also: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
|
||||||
# For release builds, the maximum log level for conduwuit is info. For debug builds, it is "trace".
|
# **Caveat**:
|
||||||
|
# For release builds, the tracing crate is configured to only implement levels higher than error to avoid unnecessary overhead in the compiled binary from trace macros.
|
||||||
|
# For debug builds, this restriction is not applied.
|
||||||
|
#
|
||||||
# Defaults to "warn"
|
# Defaults to "warn"
|
||||||
#log = "warn"
|
#log = "warn"
|
||||||
|
|
||||||
|
|
|
@ -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_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() }
|
fn default_notification_push_path() -> String { "/_matrix/push/v1/notify".to_owned() }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue