1 #include <lib/base/eerror.h>
9 // #include <lib/gui/emessage.h>
13 pthread_mutex_t memLock =
14 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
16 #include <lib/base/elock.h>
21 Signal2<void, int, const std::string&> logOutput;
22 int logOutputConsole=1;
24 void eFatal(const char* fmt, ...)
29 vsnprintf(buf, 1024, fmt, ap);
31 logOutput(lvlFatal, buf);
32 fprintf(stderr, "FATAL: %s\n",buf );
37 eMessageBox msg(buf, "FATAL ERROR", eMessageBox::iconError|eMessageBox::btOK);
47 void eDebug(const char* fmt, ...)
52 vsnprintf(buf, 1024, fmt, ap);
54 logOutput(lvlDebug, std::string(buf) + "\n");
56 fprintf(stderr, "%s\n", buf);
59 void eDebugNoNewLine(const char* fmt, ...)
64 vsnprintf(buf, 1024, fmt, ap);
66 logOutput(lvlDebug, buf);
68 fprintf(stderr, "%s", buf);
71 void eWarning(const char* fmt, ...)
76 vsnprintf(buf, 1024, fmt, ap);
78 logOutput(lvlWarning, std::string(buf) + "\n");
80 fprintf(stderr, "%s\n", buf);
84 void ePythonOutput(const char *string)
86 logOutput(lvlWarning, string);
88 fwrite(string, 1, strlen(string), stderr);
91 void eWriteCrashdump()