another new is to small
[enigma2.git] / lib / base / eerror.cpp
index 11bb994368ce58fb54ddf4f36c7f8c82558751da..3239ddc54023450b96314c78d63031146573ab2a 100644 (file)
@@ -8,6 +8,14 @@
 
 // #include <lib/gui/emessage.h>
 
+#ifdef MEMLEAK_CHECK
+AllocList *allocList;
+pthread_mutex_t memLock =
+       PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+#else
+       #include <lib/base/elock.h>
+#endif
+
 int infatal=0;
 
 Signal2<void, int, const std::string&> logOutput;
@@ -21,7 +29,7 @@ void eFatal(const char* fmt, ...)
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
        logOutput(lvlFatal, buf);
-       fprintf(stderr, "%s\n",buf );
+       fprintf(stderr, "FATAL: %s\n",buf );
 #if 0
        if (!infatal)
        {
@@ -72,3 +80,15 @@ void eWarning(const char* fmt, ...)
                fprintf(stderr, "%s\n", buf);
 }
 #endif // DEBUG
+
+void ePythonOutput(const char *string)
+{
+       logOutput(lvlWarning, string);
+       if (logOutputConsole)
+               fwrite(string, 1, strlen(string), stderr);
+}
+
+void eWriteCrashdump()
+{
+               /* implement me */
+}