mirror of
https://github.com/matrix-construct/construct
synced 2024-12-29 08:54:02 +01:00
modules/console: Output levels when no setter argument supplied.
This commit is contained in:
parent
c22ae75010
commit
198dd95573
1 changed files with 13 additions and 0 deletions
|
@ -396,6 +396,19 @@ console_cmd__log__level(opt &out, const string_view &line)
|
||||||
"level",
|
"level",
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
if(!param.count())
|
||||||
|
{
|
||||||
|
for(int i(0); i < num_of<log::facility>(); ++i)
|
||||||
|
if(i > RB_LOG_LEVEL)
|
||||||
|
out << "[\033[1;40m-\033[0m]: " << reflect(log::facility(i)) << std::endl;
|
||||||
|
else if(console_enabled(log::facility(i)))
|
||||||
|
out << "[\033[1;42m+\033[0m]: " << reflect(log::facility(i)) << std::endl;
|
||||||
|
else
|
||||||
|
out << "[\033[1;41m-\033[0m]: " << reflect(log::facility(i)) << std::endl;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const int level
|
const int level
|
||||||
{
|
{
|
||||||
param.at<int>(0)
|
param.at<int>(0)
|
||||||
|
|
Loading…
Reference in a new issue