add our_modules() for log capture filter convenience

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2024-08-08 18:09:21 +00:00
1 parent 94b805de0b
commit 9b9a91f6ef
3 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ fn reply(mut content: RoomMessageEventContent, reply_id: Option<OwnedEventId>) -
// Parse and process a message from the admin room
async fn process(context: &Command<'_>, command: AdminCommand, args: &[String]) -> CommandOutput {
let filter: &capture::Filter =
&|data| data.level() <= Level::DEBUG && data.mod_name().starts_with("conduit") && data.scope.contains(&"admin");
&|data| data.level() <= Level::DEBUG && data.our_modules() && data.scope.contains(&"admin");
let logs = Arc::new(Mutex::new(
collect_stream(|s| markdown_table_head(s)).expect("markdown table header"),
));