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:
parent
87aece1dd7
commit
d50ef4b45f
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue