mirror of
https://github.com/matrix-construct/construct
synced 2025-03-17 06:50:23 +01:00
ircd:Ⓜ️:room::message: Add specific logging facility.
This commit is contained in:
parent
467108f09a
commit
ef07d978d9
1 changed files with 8 additions and 1 deletions
|
@ -12,6 +12,7 @@ namespace ircd::m
|
|||
{
|
||||
static void room_message_notify(const event &, vm::eval &);
|
||||
extern hookfn<vm::eval &> room_message_notify_hook;
|
||||
extern log::log room_message_log;
|
||||
}
|
||||
|
||||
ircd::mapi::header
|
||||
|
@ -20,6 +21,12 @@ IRCD_MODULE
|
|||
"Matrix m.room.message"
|
||||
};
|
||||
|
||||
decltype(ircd::m::room_message_log)
|
||||
ircd::m::room_message_log
|
||||
{
|
||||
"m.message"
|
||||
};
|
||||
|
||||
decltype(ircd::m::room_message_notify_hook)
|
||||
ircd::m::room_message_notify_hook
|
||||
{
|
||||
|
@ -51,7 +58,7 @@ ircd::m::room_message_notify(const event &event,
|
|||
|
||||
log::info
|
||||
{
|
||||
m::log, "%s said %s in %s %s :%s%s",
|
||||
room_message_log, "%s said %s in %s %s :%s%s",
|
||||
json::get<"sender"_>(event),
|
||||
string_view{event.event_id},
|
||||
json::get<"room_id"_>(event),
|
||||
|
|
Loading…
Add table
Reference in a new issue