just show hdd info when there is one
[enigma2.git] / lib / base / eerror.cpp
index ac62f1e9ce2cf6c2d9d5d616b17a988ad238cb86..c60d5b7bd769cbec15c274e2c5aee02c5c7b0524 100644 (file)
@@ -4,11 +4,21 @@
 #include <stdlib.h>
 #include <unistd.h>
 
 #include <stdlib.h>
 #include <unistd.h>
 
-#include <lib/gui/emessage.h>
+#include <string>
+
+// #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;
 
 
 int infatal=0;
 
-Signal2<void, int, const eString&> logOutput;
+Signal2<void, int, const std::string&> logOutput;
 int logOutputConsole=1;
 
 void eFatal(const char* fmt, ...)
 int logOutputConsole=1;
 
 void eFatal(const char* fmt, ...)
@@ -19,7 +29,7 @@ void eFatal(const char* fmt, ...)
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
        logOutput(lvlFatal, buf);
        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)
        {
 #if 0
        if (!infatal)
        {
@@ -41,7 +51,7 @@ void eDebug(const char* fmt, ...)
        va_start(ap, fmt);
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
        va_start(ap, fmt);
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
-       logOutput(lvlDebug, eString(buf) + "\n");
+       logOutput(lvlDebug, std::string(buf) + "\n");
        if (logOutputConsole)
                fprintf(stderr, "%s\n", buf);
 }
        if (logOutputConsole)
                fprintf(stderr, "%s\n", buf);
 }
@@ -65,7 +75,7 @@ void eWarning(const char* fmt, ...)
        va_start(ap, fmt);
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
        va_start(ap, fmt);
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
-       logOutput(lvlWarning, eString(buf) + "\n");
+       logOutput(lvlWarning, std::string(buf) + "\n");
        if (logOutputConsole)
                fprintf(stderr, "%s\n", buf);
 }
        if (logOutputConsole)
                fprintf(stderr, "%s\n", buf);
 }