X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ddc3964ed95d01e72229dc9af968a327cd84e56c..b2dd2c67550f6230554b4e7bbe73b7f1b3fb366d:/lib/base/eerror.cpp diff --git a/lib/base/eerror.cpp b/lib/base/eerror.cpp index 11bb9943..3239ddc5 100644 --- a/lib/base/eerror.cpp +++ b/lib/base/eerror.cpp @@ -8,6 +8,14 @@ // #include +#ifdef MEMLEAK_CHECK +AllocList *allocList; +pthread_mutex_t memLock = + PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +#else + #include +#endif + int infatal=0; Signal2 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 */ +}