X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3bad22d5566624804a73b3791980bab2d84c8266..8f01a41693ff4b01a224e9ea2f9a26538ec20414:/lib/base/eerror.cpp diff --git a/lib/base/eerror.cpp b/lib/base/eerror.cpp index ac62f1e9..c60d5b7b 100644 --- a/lib/base/eerror.cpp +++ b/lib/base/eerror.cpp @@ -4,11 +4,21 @@ #include #include -#include +#include + +// #include + +#ifdef MEMLEAK_CHECK +AllocList *allocList; +pthread_mutex_t memLock = + PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +#else + #include +#endif int infatal=0; -Signal2 logOutput; +Signal2 logOutput; 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); - fprintf(stderr, "%s\n",buf ); + fprintf(stderr, "FATAL: %s\n",buf ); #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); - logOutput(lvlDebug, eString(buf) + "\n"); + logOutput(lvlDebug, std::string(buf) + "\n"); 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); - logOutput(lvlWarning, eString(buf) + "\n"); + logOutput(lvlWarning, std::string(buf) + "\n"); if (logOutputConsole) fprintf(stderr, "%s\n", buf); }