0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 08:24:08 +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
++calls;
const scope_count site_calling{calling};
const scope_count site_calling
{
calling
};
// stats for hook
++hfn.calls;
const scope_count hook_calling{hfn.calling};
const scope_count hook_calling
{
hfn.calling
};
// call hook
hfn.function(event, d);
@ -175,7 +181,7 @@ catch(const std::exception &e)
log::critical
{
"Unhandled hookfn(%p) %s error :%s",
log, "Unhandled hookfn(%p) %s error :%s",
&hfn,
string_view{hfn.feature},
e.what()

View file

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