0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

modules: Use the apropos matrix logger for various log messages.

This commit is contained in:
Jason Volk 2018-12-22 17:44:18 -08:00
parent 8e8602e08a
commit b1bd4e8863
12 changed files with 25 additions and 25 deletions

View file

@ -70,7 +70,7 @@ catch(const std::exception &e)
{
log::derror
{
"Presence from %s :%s",
m::log, "Presence from %s :%s",
json::get<"origin"_>(event),
e.what(),
};
@ -90,7 +90,7 @@ try
{
log::dwarning
{
"Ignoring %s from %s for user %s",
m::log, "Ignoring %s from %s for user %s",
at<"type"_>(event),
at<"origin"_>(event),
string_view{user_id}
@ -158,7 +158,7 @@ try
log::info
{
"%s %s is %s and %s %zd seconds ago",
m::log, "%s %s is %s and %s %zd seconds ago",
at<"origin"_>(event),
string_view{user_id},
json::get<"currently_active"_>(object)? "active"_sv : "inactive"_sv,
@ -170,7 +170,7 @@ catch(const m::error &e)
{
log::error
{
"Presence from %s :%s :%s",
m::log, "Presence from %s :%s :%s",
json::get<"origin"_>(event),
e.what(),
e.content

View file

@ -75,7 +75,7 @@ handle_m_receipt(const m::room::id &room_id,
log::dwarning
{
"Unhandled m.receipt type '%s' to room '%s'",
m::log, "Unhandled m.receipt type '%s' to room '%s'",
type,
string_view{room_id}
};
@ -142,7 +142,7 @@ try
{
log::dwarning
{
"ignoring m.receipt m.read for unknown %s in %s for %s",
m::log, "ignoring m.receipt m.read for unknown %s in %s for %s",
string_view{user_id},
string_view{room_id},
string_view{event_id}
@ -196,7 +196,7 @@ try
log::info
{
"%s read by %s in %s @ %zd",
m::log, "%s read by %s in %s @ %zd",
string_view{event_id},
string_view{user_id},
string_view{room_id},
@ -207,7 +207,7 @@ catch(const std::exception &e)
{
log::derror
{
"failed to save m.receipt m.read for %s in %s for %s :%s",
m::log, "failed to save m.receipt m.read for %s in %s for %s :%s",
string_view{user_id},
string_view{room_id},
string_view{event_id},

View file

@ -645,7 +645,7 @@ head__reset(const m::room &room)
{
log::derror
{
"Invalid event '%s' idx %lu in head for %s",
m::log, "Invalid event '%s' idx %lu in head for %s",
string_view{event_id},
event_idx,
string_view{room.room_id}
@ -724,7 +724,7 @@ dagree_histogram(const m::room &room,
{
log::warning
{
"Event '%s' had %zu prev events (ignored)",
m::log, "Event '%s' had %zu prev events (ignored)",
string_view(at<"event_id"_>(event))
};

View file

@ -52,7 +52,7 @@ _changed_aliases(const m::event &event,
log::info
{
"Updated aliases of %s by %s in %s [%s] => %s",
m::log, "Updated aliases of %s by %s in %s [%s] => %s",
string_view{room_id},
json::get<"sender"_>(event),
json::get<"event_id"_>(event),

View file

@ -49,7 +49,7 @@ _changed_canonical_alias(const m::event &event,
log::info
{
"Changed canonical alias of %s to %s by %s with %s => %s",
m::log, "Changed canonical alias of %s to %s by %s with %s => %s",
string_view{room_id},
string_view{alias},
json::get<"sender"_>(event),

View file

@ -108,7 +108,7 @@ _created_room(const m::event &event,
log::debug
{
"Creation of room %s by %s (%s)",
m::log, "Creation of room %s by %s (%s)",
string_view{room_id},
at<"sender"_>(event),
at<"event_id"_>(event)

View file

@ -142,7 +142,7 @@ _changed_visibility(const m::event &event,
{
log::info
{
"Changed visibility of %s to %s by %s => %s",
m::log, "Changed visibility of %s to %s by %s => %s",
json::get<"room_id"_>(event),
json::get<"content"_>(event).get("history_visibility"),
json::get<"sender"_>(event),

View file

@ -61,7 +61,7 @@ _changed_rules_notify(const m::event &event,
{
log::info
{
"%s changed join_rules in %s [%s] to %s",
m::log, "%s changed join_rules in %s [%s] to %s",
json::get<"sender"_>(event),
json::get<"room_id"_>(event),
json::get<"event_id"_>(event),

View file

@ -64,7 +64,7 @@ _can_join_room(const m::event &event,
if(join_rule != "invite")
log::dwarning
{
"Unsupported join_rule '%s' for room %s. Defaulting to 'invite'.",
m::log, "Unsupported join_rule '%s' for room %s. Defaulting to 'invite'.",
join_rule,
string_view{room.room_id}
};
@ -78,7 +78,7 @@ _can_join_room(const m::event &event,
if(membership && membership != "leave")
log::dwarning
{
"Unsupported membership state '%s' for %s in room %s.",
m::log, "Unsupported membership state '%s' for %s in room %s.",
membership,
string_view{sender},
string_view{room.room_id}

View file

@ -27,7 +27,7 @@ _message_notify(const m::event &event,
log::info
{
"%s said %s in %s %s :%s%s",
m::log, "%s said %s in %s %s :%s%s",
json::get<"sender"_>(event),
json::get<"event_id"_>(event),
json::get<"room_id"_>(event),

View file

@ -68,7 +68,7 @@ _has_power(const m::event &event,
if(!power(sender, "events", type, state_key))
log::warning //TODO: throw
{
"Power violation %s in %s for %s %s,%s",
m::log, "Power violation %s in %s for %s %s,%s",
string_view{sender},
string_view{room_id},
string_view{event_id},
@ -110,7 +110,7 @@ _changed_levels(const m::event &event,
{
log::info
{
"%s changed power_levels in %s [%s]",
m::log, "%s changed power_levels in %s [%s]",
json::get<"sender"_>(event),
json::get<"room_id"_>(event),
json::get<"event_id"_>(event)

View file

@ -174,7 +174,7 @@ _handle_edu_m_typing(const m::event &event,
{
log::dwarning
{
"Ignoring %s from %s for user %s",
m::log, "Ignoring %s from %s for user %s",
at<"type"_>(event),
at<"origin"_>(event),
string_view{user_id}
@ -196,7 +196,7 @@ _handle_edu_m_typing(const m::event &event,
{
log::dwarning
{
"Ignoring %s from %s for user %s because not in room '%s'",
m::log, "Ignoring %s from %s for user %s because not in room '%s'",
at<"type"_>(event),
at<"origin"_>(event),
string_view{user_id},
@ -217,7 +217,7 @@ _handle_edu_m_typing(const m::event &event,
log::info
{
"%s %s %s typing in %s",
m::log, "%s %s %s typing in %s",
at<"origin"_>(event),
string_view{user_id},
json::get<"typing"_>(edu)? "started"_sv : "stopped"_sv,
@ -311,7 +311,7 @@ timeout_timeout(const typist &t)
log::debug
{
"Typing timeout for %s in %s",
m::log, "Typing timeout for %s in %s",
string_view{t.user_id},
string_view{t.room_id}
};
@ -417,7 +417,7 @@ update_state(const m::typing &object)
log::debug
{
"Typing %s in %s now[%b] was[%b] xmit[%b]",
m::log, "Typing %s in %s now[%b] was[%b] xmit[%b]",
string_view{at<"user_id"_>(object)},
string_view{at<"room_id"_>(object)},
json::get<"typing"_>(object),