0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 05:29:00 +02:00

ircd:Ⓜ️:room::message: Add specific logging facility.

This commit is contained in:
Jason Volk 2021-05-10 22:28:52 -07:00
parent 467108f09a
commit ef07d978d9

View file

@ -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),