Cleanup Perl logging and streamline formatting, tie errors to main Quests logging category live output, add string utils

This commit is contained in:
Akkadius
2020-01-01 19:04:11 -06:00
parent 6e4d9a915d
commit 406b193206
5 changed files with 618 additions and 432 deletions
+7 -3
View File
@@ -100,15 +100,19 @@ XS(XS_EQEmuIO_PRINT)
*std::remove(str, str + strlen(str), '\n') = '\0';
std::string log_string = str;
if (log_string.find("did not return a true") != std::string::npos)
return;;
return;
if (log_string.find("is experimental") != std::string::npos)
return;
int i;
int pos = 0;
int len = 0;
for(i = 0; *cur != '\0'; i++, cur++) {
if(*cur == '\n') {
Log(Logs::General, Logs::Quests, str);
LogQuests(str);
len = 0;
pos = i+1;
} else {
@@ -116,7 +120,7 @@ XS(XS_EQEmuIO_PRINT)
}
}
if(len > 0) {
Log(Logs::General, Logs::Quests, str);
LogQuests(str);
}
}