0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-26 18:38:52 +02:00

modules/console: Output levels when no setter argument supplied.

This commit is contained in:
Jason Volk 2018-05-21 17:16:02 -07:00
parent c22ae75010
commit 198dd95573

View file

@ -396,6 +396,19 @@ console_cmd__log__level(opt &out, const string_view &line)
"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
{
param.at<int>(0)