add optional support for tokio-console
This turned out to be quite hairy, mostly because we need to apply the config's log level filter to the actual logs (stdout and, optionally sentry), but do not want to filter out the tokio tracing events needed by the console_subscriber. I hit several edge cases in tracing getting this to work, and we now depend on a git version of tracing with a backported patch :(
This commit is contained in:
@@ -331,7 +331,7 @@ pub(crate) async fn change_log_level(
|
||||
match services()
|
||||
.globals
|
||||
.tracing_reload_handle
|
||||
.modify(|filter| *filter = old_filter_layer)
|
||||
.reload(&old_filter_layer)
|
||||
{
|
||||
Ok(()) => {
|
||||
return Ok(RoomMessageEventContent::text_plain(format!(
|
||||
@@ -360,7 +360,7 @@ pub(crate) async fn change_log_level(
|
||||
match services()
|
||||
.globals
|
||||
.tracing_reload_handle
|
||||
.modify(|filter| *filter = new_filter_layer)
|
||||
.reload(&new_filter_layer)
|
||||
{
|
||||
Ok(()) => {
|
||||
return Ok(RoomMessageEventContent::text_plain("Successfully changed log level"));
|
||||
|
||||
Reference in New Issue
Block a user