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:
parent
6a7e7f448b
commit
fea6bfb395
2 changed files with 21 additions and 7 deletions
|
@ -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()
|
||||
|
|
16
ircd/m.cc
16
ircd/m.cc
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue