0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

ircd::log: Add interface to toggle facility to console.

This commit is contained in:
Jason Volk 2018-02-21 16:11:24 -08:00
parent 87aece1dd7
commit d50ef4b45f
2 changed files with 22 additions and 0 deletions

View file

@ -42,6 +42,10 @@ namespace ircd::log
struct info;
struct debug;
bool console_enabled(const facility &);
void console_disable(const facility &);
void console_enable(const facility &);
void flush();
void close();
void open();

View file

@ -157,6 +157,24 @@ catch(const std::exception &e)
throw;
}
void
ircd::log::console_enable(const facility &fac)
{
console_out[fac] = true;
}
void
ircd::log::console_disable(const facility &fac)
{
console_out[fac] = false;
}
bool
ircd::log::console_enabled(const facility &fac)
{
return console_out[fac];
}
ircd::log::console_quiet::console_quiet(const bool &showmsg)
{
if(showmsg)