remove explicit \e coloring

This commit is contained in:
Lephenixnoir 2022-04-05 12:23:39 +01:00
parent d7b3fd0de8
commit 613e5b07f4
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@
#include <deque>
#include <fmt/core.h>
#include <fxos/util/log.h>
/* Values to attach to the token */
typedef Token::Attribute YYSTYPE;
@ -218,7 +219,7 @@ void lex_include(std::vector<std::string> paths)
for(auto const &path: paths) {
yyin = fopen(path.c_str(), "r");
if(!yyin) {
fmt::print("\x1b[31;1merror:\x1b cannot read '{}'\n", path);
FxOS_log(ERR, "cannot read '%s'", path);
return;
}

View File

@ -404,11 +404,11 @@ int main(int argc, char **argv)
commands[cmd]->function(s, parser);
}
else {
fmt::print("\e[31;1merror:\e[0m unknown command '{}'\n", cmd);
FxOS_log(ERR, "unknown command '%s'", cmd);
}
}
catch(std::exception &e) {
fmt::print("\e[31;1merror:\e[0m {}\n", e.what());
FxOS_log(ERR, "%s", e.what());
}
/* Exhaust command input (if not all used by the command) */