1 #include <lib/base/eerror.h>
9 // #include <lib/gui/emessage.h>
13 Signal2<void, int, const std::string&> logOutput;
14 int logOutputConsole=1;
16 void eFatal(const char* fmt, ...)
21 vsnprintf(buf, 1024, fmt, ap);
23 logOutput(lvlFatal, buf);
24 fprintf(stderr, "%s\n",buf );
29 eMessageBox msg(buf, "FATAL ERROR", eMessageBox::iconError|eMessageBox::btOK);
39 void eDebug(const char* fmt, ...)
44 vsnprintf(buf, 1024, fmt, ap);
46 logOutput(lvlDebug, std::string(buf) + "\n");
48 fprintf(stderr, "%s\n", buf);
51 void eDebugNoNewLine(const char* fmt, ...)
56 vsnprintf(buf, 1024, fmt, ap);
58 logOutput(lvlDebug, buf);
60 fprintf(stderr, "%s", buf);
63 void eWarning(const char* fmt, ...)
68 vsnprintf(buf, 1024, fmt, ap);
70 logOutput(lvlWarning, std::string(buf) + "\n");
72 fprintf(stderr, "%s\n", buf);