This commit is contained in:
2020-11-17 12:01:15 +01:00
parent ccf6982b62
commit 23568db1b5
8 changed files with 137 additions and 165 deletions

View File

@ -118,15 +118,7 @@ int logMsg(const char *format, ...) {
return res;
}
int errMsg(const char *format, ...) {
va_list vl;
va_start(vl, format);
int res = innerLogMsg("\x1b[31;1m", "\x1b[0m\r\n", true, format, vl);
va_end(vl);
return res;
}
int coloredMsg(const t_logColor color, const char *format, ...) {
int coloredMsg(const t_logColor color, bool syslogToo, const char *format, ...) {
const static char POST[] = "\x1b[0m\r\n";
const static char HIGH[] = "\x1b[1m";
const static char RED[] = "\x1b[31;1m";
@ -153,7 +145,7 @@ int coloredMsg(const t_logColor color, const char *format, ...) {
}
va_list vl;
va_start(vl, format);
int res = innerLogMsg(pre, POST, false, format, vl);
int res = innerLogMsg(pre, POST, syslogToo, format, vl);
va_end(vl);
return res;
}