0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 15:00:51 +01:00

modules/console: Add log mask cmd suite; recategorize log mark cmd under log.

This commit is contained in:
Jason Volk 2018-04-23 15:55:13 -07:00
parent 2e3e8bc0d5
commit 7e27be36d9

View file

@ -365,18 +365,64 @@ console_cmd__debug(opt &out, const string_view &line)
}
}
bool
console_cmd__mark(opt &out, const string_view &line)
{
log::mark(line);
//
// log
//
out << "The log files were marked with '" << line
bool
console_cmd__log__mask(opt &out, const string_view &line)
{
thread_local string_view list[64];
const auto &count
{
tokens(line, ' ', list)
};
log::console_mask({list, count});
return true;
}
bool
console_cmd__log__unmask(opt &out, const string_view &line)
{
thread_local string_view list[64];
const auto &count
{
tokens(line, ' ', list)
};
log::console_unmask({list, count});
return true;
}
bool
console_cmd__log__mark(opt &out, const string_view &line)
{
const string_view &msg
{
empty(line)?
"marked by console":
line
};
log::mark
{
msg
};
out << "The log files were marked with '" << msg
<< "'"
<< std::endl;
return true;
}
bool
console_cmd__mark(opt &out, const string_view &line)
{
return console_cmd__log__mark(out, line);
}
//
// info
//