0
0
Fork 0
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:
Jason Volk 2016-11-12 17:45:28 -08:00
parent e3f3543d65
commit 8554fc858b
2 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -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)
{ {