mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::log: Add function to logger with facility argument.
This commit is contained in:
parent
e3f3543d65
commit
8554fc858b
2 changed files with 12 additions and 0 deletions
|
@ -80,6 +80,7 @@ class log
|
||||||
lease_ptr snote;
|
lease_ptr snote;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator()(const facility &, const char *fmt, ...) AFP(3, 4);
|
||||||
void critical(const char *fmt, ...) AFP(2, 3);
|
void critical(const char *fmt, ...) AFP(2, 3);
|
||||||
void error(const char *fmt, ...) AFP(2, 3);
|
void error(const char *fmt, ...) AFP(2, 3);
|
||||||
void warning(const char *fmt, ...) AFP(2, 3);
|
void warning(const char *fmt, ...) AFP(2, 3);
|
||||||
|
|
|
@ -342,6 +342,17 @@ log::log::critical(const char *const fmt,
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
log::log::operator()(const facility &facility,
|
||||||
|
const char *const fmt,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
|
vlog(facility, name, snote? sno::mask(*snote) : sno::mask(0), fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
log::mark(const char *const &msg)
|
log::mark(const char *const &msg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue