0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-30 17:34:04 +01:00

ircd:Ⓜ️🪝 Fix missing facility in log calls.

ircd:Ⓜ️🪝 Minor cleanup.
This commit is contained in:
Jason Volk 2019-07-26 12:17:47 -07:00
parent 6a7e7f448b
commit fea6bfb395
2 changed files with 21 additions and 7 deletions

View file

@ -159,11 +159,17 @@ try
{ {
// stats for site // stats for site
++calls; ++calls;
const scope_count site_calling{calling}; const scope_count site_calling
{
calling
};
// stats for hook // stats for hook
++hfn.calls; ++hfn.calls;
const scope_count hook_calling{hfn.calling}; const scope_count hook_calling
{
hfn.calling
};
// call hook // call hook
hfn.function(event, d); hfn.function(event, d);
@ -175,7 +181,7 @@ catch(const std::exception &e)
log::critical log::critical
{ {
"Unhandled hookfn(%p) %s error :%s", log, "Unhandled hookfn(%p) %s error :%s",
&hfn, &hfn,
string_view{hfn.feature}, string_view{hfn.feature},
e.what() e.what()

View file

@ -4081,7 +4081,9 @@ ircd::m::hook::base::site::add(base &hook)
{ {
log::warning log::warning
{ {
"Hook %p already registered to site %s", &hook, name() log, "Hook %p already registered to site %s",
&hook,
name()
}; };
return false; return false;
@ -4195,11 +4197,17 @@ try
{ {
// stats for site // stats for site
++calls; ++calls;
const scope_count site_calling{calling}; const scope_count site_calling
{
calling
};
// stats for hook // stats for hook
++hfn.calls; ++hfn.calls;
const scope_count hook_calling{hfn.calling}; const scope_count hook_calling
{
hfn.calling
};
// call hook // call hook
hfn.function(event); hfn.function(event);
@ -4211,7 +4219,7 @@ catch(const std::exception &e)
log::critical log::critical
{ {
"Unhandled hookfn(%p) %s error :%s", log, "Unhandled hookfn(%p) %s error :%s",
&hfn, &hfn,
string_view{hfn.feature}, string_view{hfn.feature},
e.what() e.what()