along with VOMP. If not, see <https://www.gnu.org/licenses/>.
*/
-#include "log.h"
+#include "oldlog.h"
#include "demuxer.h"
#include "callback.h"
#include "util.h"
#include "audio.h"
-#include "log.h"
+#include "oldlog.h"
Audio* Audio::instance = NULL;
#include <bcm_host.h>
#include "videoomx.h"
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "woptionpane.h"
#include "osdopenvg.h"
#include "messagequeue.h"
#include "i18n.h"
#include "boxx.h"
-#include "log.h"
+#include "oldlog.h"
#include "media.h"
#include "mediaplayer.h"
#define AUDIOWIN_H
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "audio.h"
#include <winsock2.h>
#include <dshow.h>
#include "messagequeue.h"
#include "input.h"
-#include "log.h"
+#include "oldlog.h"
BoxStack* BoxStack::instance = NULL;
#include <stdlib.h>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "message.h"
#include "osd.h"
#include "surface.h"
#include "channel.h"
#include "vdr.h"
-#include "log.h"
+#include "oldlog.h"
#include "control.h"
Channel::Channel()
#include "vinfo.h"
#include "boxx.h"
#include "boxstack.h"
-#include "log.h"
+#include "oldlog.h"
#include "sleeptimer.h"
#include "wjpeg.h"
#include "osdvector.h"
#include "callback.h"
#include "dvbsubtitles.h"
-#include "log.h"
+#include "oldlog.h"
#include <cstdlib>
#include <algorithm>
#include "demuxeraudio.h"
#include "audio.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#define HDRBYTE1 0xff
#define HDRBYTE2 0xe0
#include "callback.h"
#include "video.h"
-#include "log.h"
+#include "oldlog.h"
#ifndef WIN32
#include <endian.h>
*/
#include "demuxerts.h"
-#include "log.h"
+#include "oldlog.h"
#include "video.h"
#include "vdr.h"
#include "audio.h"
#include "demuxervdr.h"
#include "video.h"
#include "dvbsubtitles.h"
-#include "log.h"
+#include "oldlog.h"
#ifndef WIN32
#include <endian.h>
#include "osd.h"
#include "windowsosd.h"
#include "dsallocator.h"
-#include "log.h"
+#include "oldlog.h"
#include <math.h>
#include "demuxer.h"
#include "osdreceiver.h"
#include "video.h"
-#include "log.h"
+#include "oldlog.h"
#include "dvbsubtitles.h"
*/
#include "event.h"
-#include "log.h"
+#include "oldlog.h"
#include "control.h"
#include "movieinfo.h"
#include "seriesinfo.h"
#define GL_SHADER_H
#include <GLES2/gl2.h>
-#include "log.h"
+#include "oldlog.h"
class GLShader {
public:
#endif*/
#include "vdr.h"
-#include "log.h"
+#include "oldlog.h"
I18n::trans_table I18n::Translations;
#include <bcm_host.h>
#include "videoomx.h"
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "woptionpane.h"
#include "util.h"
#include "mediaprovider.h"
#include "media.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
ImageReader::ImageReader(int c, MediaProvider *p)
#include "wremoteconfig.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "wtabbar.h"
#include "message.h"
#include <bcm_host.h>
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "woptionpane.h"
#include "inputcec.h"
#include <stdexcept>
#include "config.h"
-#include "log.h"
+#include "oldlog.h"
#include "inputman.h"
*/
#include "config.h"
-#include "log.h"
+#include "oldlog.h"
#include "wremoteconfig.h"
#include "wtabbar.h"
#ifdef VOMP_PLATFORM_RASPBERRY
#include <unistd.h>
#endif
-#include "log.h"
+#include "oldlog.h"
#include "inputudp.h"
#include "vompreswin.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "inputwin.h"
#define W_G_HCW(type,code) ( (((ULLONG)(type))<<32) | code)
#include "media.h"
#include "mediaproviderids.h"
#include <iostream>
-#include "log.h"
+#include "oldlog.h"
LocalMediaFile *LocalMediaFile::instance =NULL;
#endif
#include <iostream>
-#include "log.h"
+#include "oldlog.h"
#define BASEDIR "media"
+++ /dev/null
-/*
- Copyright 2004-2005 Chris Tallon
- Copyright 2003-2004 University Of Bradford
-
- This file is part of VOMP.
-
- VOMP is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- VOMP is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with VOMP; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include <sys/types.h>
-
-#ifndef WIN32
-#include <sys/syscall.h>
-#include <unistd.h>
-#endif
-
-#include "vdr.h"
-
-
-#include "log.h"
-
-
-#ifdef __ANDROID__
-#include <android/log.h>
-#endif
-
-Log* Log::instance = NULL;
-
-Log::Log()
-{
- if (instance) return;
- instance = this;
- logfile = NULL;
- initted = 0;
- logLevel = 0;
- extlog = NULL;
-}
-
-Log::~Log()
-{
- instance = NULL;
-}
-
-Log* Log::getInstance()
-{
- return instance;
-}
-
-void Log::upLogLevel()
-{
- if (logLevel == Log::DEBUG)
- {
- log("Log", logLevel, "Log level is at its highest already");
- return;
- }
-
- logLevel++;
- log("Log", logLevel, "Log level is now %i", logLevel);
-}
-
-void Log::downLogLevel()
-{
- if (logLevel == Log::CRAZY)
- {
- log("Log", logLevel, "Log level is at its lowest already");
- return;
- }
-
- logLevel--;
- log("Log", logLevel, "Log level is now %i", logLevel);
-}
-
-int Log::init(int startLogLevel, const char* fileName, int tenabled)
-{
- (void)fileName;
-
- initted = 1;
- logLevel = startLogLevel;
- enabled = tenabled;
-
- // FIXME fix this with NCONFIG
-// logfile = fopen(fileName, "a");
-// logfile = fopen(stdout, "a");
- logfile = stdout;
-// logfile = fopen("/log", "a");
-
- if (logfile) return 1;
- else return 0;
-}
-
-int Log::shutdown()
-{
- if (!initted) return 1;
- if (enabled && (logfile != stdout)) fclose(logfile);
- return 1;
-}
-
-int Log::log(const char *fromModule, int level,const char* message, ...)
-{
- if (!instance || !logfile) return 0;
-
- if (!enabled && !extlog) return 1;
- if (level > logLevel) return 1;
-
- char buffer[151];
- int spaceLeft = 150;
-
-#ifndef _MSC_VER
- struct timeval tv;
- gettimeofday(&tv, NULL);
- struct tm tms;
- LOCALTIME_R(&tv.tv_sec, &tms);
- spaceLeft -= strftime(buffer, spaceLeft, "%H:%M:%S.", &tms);
- spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%06lu ", static_cast<unsigned long>(tv.tv_usec));
-#else
- struct _timeb tb;
- _ftime(&tb);
- struct tm* tms = localtime(&tb.time);
- spaceLeft -= strftime(buffer, spaceLeft, "%H:%M:%S.", tms);
- spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%06lu ", (unsigned long)tb.millitm);
-#endif
-
- char levelString[10];
- if (level == CRAZY) strcpy(levelString, "[CRAZY] ");
- if (level == EMERG) strcpy(levelString, "[EMERG] ");
- if (level == ALERT) strcpy(levelString, "[ALERT] ");
- if (level == CRIT) strcpy(levelString, "[CRIT] ");
- if (level == ERR) strcpy(levelString, "[ERR] ");
- if (level == WARN) strcpy(levelString, "[WARN] ");
- if (level == NOTICE) strcpy(levelString, "[notice]");
- if (level == INFO) strcpy(levelString, "[info] ");
- if (level == DEBUG) strcpy(levelString, "[debug] ");
-
-#ifndef WIN32
- spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %lu %li %s - ", levelString, pthread_self(), syscall(SYS_gettid), fromModule);
-#else
- spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %s - ", levelString, fromModule);
-#endif
-
- va_list ap;
- va_start(ap, message);
- spaceLeft = VSNPRINTF(&buffer[150-spaceLeft], spaceLeft, message, ap);
- va_end(ap);
-
- int messageLength = strlen(buffer);
- if (messageLength < 150)
- {
- buffer[messageLength] = '\n';
- buffer[messageLength+1] = '\0';
- }
- else
- {
- buffer[149] = '\n';
- buffer[150] = '\0';
- }
-
- int success = 1;
- if (enabled)
- {
-#ifndef __ANDROID__
- success = fputs(buffer, logfile);
- fflush(NULL);
-#else
- int and_level=0;
- switch (level) {
- case CRAZY:
- case ALERT:
- case EMERG :
- case CRIT:{
- and_level=ANDROID_LOG_FATAL;
- } break;
- case ERR: {
- and_level=ANDROID_LOG_ERROR;
- } break;
- case WARN: {
- and_level=ANDROID_LOG_WARN;
- } break;
- case NOTICE:
- case INFO: {
- and_level=ANDROID_LOG_INFO;
- } break;
- case DEBUG :{
- and_level=ANDROID_LOG_DEBUG;
- } break;
- };
- __android_log_vprint(and_level, fromModule,
- message, ap);
-#endif
- }
-
- if (extlog) extlog->LogExtern(buffer); //Replacement for network logging
-
-
- if (success != EOF)
- return 1;
- else
- return 0;
-
-}
-
-void Log::logLongString(const char *fromModule, int level,const char *message)
-{
- int string_size=strlen(message);
- char buffer[100];
- const char * pointer=message;
- for (int str_written=0; str_written<string_size;str_written+=99) {
- strncpy(buffer,pointer,99);
- buffer[99]=0;
- pointer+=99;
- log(fromModule,level,"%s",buffer);
- }
-
-}
-
-int Log::status()
-{
- if (instance && logfile) return 1;
- else return 0;
-}
-
-void Log::setExternLogger(ExternLogger* login) {
- extlog=login;
- log("Log", Log::DEBUG, "Extern logging started");
-}
-
-
-
-
+++ /dev/null
-/*
- Copyright 2004-2005 Chris Tallon
- Copyright 2003-2004 University Of Bradford
-
- This file is part of VOMP.
-
- VOMP is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- VOMP is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with VOMP; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#ifndef LOG_H
-#define LOG_H
-
-#include <stdio.h>
-#ifndef WIN32
- #include <unistd.h>
- #include <sys/time.h>
-#else
- #include <sys/timeb.h>
-#endif
-
-#include <time.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include "defines.h"
-
-
-class ExternLogger {
-public:
- virtual bool LogExtern(const char* message)=0;
-};
-
-
-class Log
-{
- public:
- Log();
- ~Log();
- static Log* getInstance();
-
- int init(int defaultLevel,const char* fileName, int enabled);
- int shutdown();
- int log(const char *fromModule, int level,const char *message, ...);
- void logLongString(const char *fromModule, int level,const char *message);
- int status();
- void upLogLevel();
- void downLogLevel();
- void setExternLogger(ExternLogger* log);
- void unsetExternLogger() {
- extlog=NULL;
- }
-
-
-
- const static int CRAZY = 0; // mad crazy things that should never happen
- const static int EMERG = 1; // human assist required NOW
- const static int ALERT = 2; // system unusable, but happy to sit there
- const static int CRIT = 3; // still working, but maybe about to die
- const static int ERR = 4; // that response is not even listed...
- const static int WARN = 5; // this could be a bad thing. still running tho
- const static int NOTICE = 6; // significant good thing
- const static int INFO = 7; // verbose good thing
- const static int DEBUG = 8; // debug-level messages
-
- private:
- static Log* instance;
- int initted;
- int logLevel;
- int enabled;
-
- FILE *logfile;
-
- ExternLogger* extlog;
-
-
-};
-
-#endif
-
-/*
-
-Documentation
--------------
-
-This class is intended to be instatiated once by the core.
-For a one off use:
-
-Log::getInstance()->log("<module-name>", Log::<levelname>, "<message>");
-
-Or, a pointer can be stored and used:
-
-Log *myptr = Log::getInstance();
-
-myptr->log("<module-name>", Log::<levelname>, "<message>");
-myptr->log("<module-name>", Log::<levelname>, "<message>");
-
-Level usages are above.
-
-The message parameter in the log function can be used in the same way as printf, eg.
-
-myptr->log("<module-name>", Log::<levelname>, "Success: %s %i", stringpointer, integer);
-
-*/
#endif
#include "config.h"
-#include "log.h"
+#include "oldlog.h"
#include "util.h"
#include "control.h"
#include <stddef.h>
#include <iostream>
-#include "log.h"
+#include "oldlog.h"
#include <stdio.h>
#include <string.h>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "abstractoption.h"
class WTabBar;
#include "mediaplayer.h"
#include "media.h"
-#include "log.h"
+#include "oldlog.h"
class MediaProviderHolder {
public:
#include "messagequeue.h"
#include "message.h"
-#include "log.h"
+#include "oldlog.h"
MessageQueue* MessageQueue::instance{};
OBJ_COMMON = util.o control.o thread.o timers.o i18n.o udp4.o udp6.o vdpc.o tcp.o \
- message.o messagequeue.o wol.o audio.o video.o log.o \
+ message.o messagequeue.o wol.o audio.o video.o oldlog.o \
vdr.o recman.o recording.o recinfo.o channel.o rectimer.o event.o \
directory.o mark.o option.o vfeed.o afeed.o \
demuxer.o demuxervdr.o demuxerts.o stream.o osd.o surface.o \
--- /dev/null
+/*
+ Copyright 2004-2005 Chris Tallon
+ Copyright 2003-2004 University Of Bradford
+
+ This file is part of VOMP.
+
+ VOMP is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ VOMP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with VOMP; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <sys/types.h>
+
+#ifndef WIN32
+#include <sys/syscall.h>
+#include <unistd.h>
+#endif
+
+#include "vdr.h"
+
+
+#include "oldlog.h"
+
+
+#ifdef __ANDROID__
+#include <android/log.h>
+#endif
+
+Log* Log::instance = NULL;
+
+Log::Log()
+{
+ if (instance) return;
+ instance = this;
+ logfile = NULL;
+ initted = 0;
+ logLevel = 0;
+ extlog = NULL;
+}
+
+Log::~Log()
+{
+ instance = NULL;
+}
+
+Log* Log::getInstance()
+{
+ return instance;
+}
+
+void Log::upLogLevel()
+{
+ if (logLevel == Log::DEBUG)
+ {
+ log("Log", logLevel, "Log level is at its highest already");
+ return;
+ }
+
+ logLevel++;
+ log("Log", logLevel, "Log level is now %i", logLevel);
+}
+
+void Log::downLogLevel()
+{
+ if (logLevel == Log::CRAZY)
+ {
+ log("Log", logLevel, "Log level is at its lowest already");
+ return;
+ }
+
+ logLevel--;
+ log("Log", logLevel, "Log level is now %i", logLevel);
+}
+
+int Log::init(int startLogLevel, const char* fileName, int tenabled)
+{
+ (void)fileName;
+
+ initted = 1;
+ logLevel = startLogLevel;
+ enabled = tenabled;
+
+ // FIXME fix this with NCONFIG
+// logfile = fopen(fileName, "a");
+// logfile = fopen(stdout, "a");
+ logfile = stdout;
+// logfile = fopen("/log", "a");
+
+ if (logfile) return 1;
+ else return 0;
+}
+
+int Log::shutdown()
+{
+ if (!initted) return 1;
+ if (enabled && (logfile != stdout)) fclose(logfile);
+ return 1;
+}
+
+int Log::log(const char *fromModule, int level,const char* message, ...)
+{
+ if (!instance || !logfile) return 0;
+
+ if (!enabled && !extlog) return 1;
+ if (level > logLevel) return 1;
+
+ char buffer[151];
+ int spaceLeft = 150;
+
+#ifndef _MSC_VER
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ struct tm tms;
+ LOCALTIME_R(&tv.tv_sec, &tms);
+ spaceLeft -= strftime(buffer, spaceLeft, "%H:%M:%S.", &tms);
+ spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%06lu ", static_cast<unsigned long>(tv.tv_usec));
+#else
+ struct _timeb tb;
+ _ftime(&tb);
+ struct tm* tms = localtime(&tb.time);
+ spaceLeft -= strftime(buffer, spaceLeft, "%H:%M:%S.", tms);
+ spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%06lu ", (unsigned long)tb.millitm);
+#endif
+
+ char levelString[10];
+ if (level == CRAZY) strcpy(levelString, "[CRAZY] ");
+ if (level == EMERG) strcpy(levelString, "[EMERG] ");
+ if (level == ALERT) strcpy(levelString, "[ALERT] ");
+ if (level == CRIT) strcpy(levelString, "[CRIT] ");
+ if (level == ERR) strcpy(levelString, "[ERR] ");
+ if (level == WARN) strcpy(levelString, "[WARN] ");
+ if (level == NOTICE) strcpy(levelString, "[notice]");
+ if (level == INFO) strcpy(levelString, "[info] ");
+ if (level == DEBUG) strcpy(levelString, "[debug] ");
+
+#ifndef WIN32
+ spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %lu %li %s - ", levelString, pthread_self(), syscall(SYS_gettid), fromModule);
+#else
+ spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %s - ", levelString, fromModule);
+#endif
+
+ va_list ap;
+ va_start(ap, message);
+ spaceLeft = VSNPRINTF(&buffer[150-spaceLeft], spaceLeft, message, ap);
+ va_end(ap);
+
+ int messageLength = strlen(buffer);
+ if (messageLength < 150)
+ {
+ buffer[messageLength] = '\n';
+ buffer[messageLength+1] = '\0';
+ }
+ else
+ {
+ buffer[149] = '\n';
+ buffer[150] = '\0';
+ }
+
+ int success = 1;
+ if (enabled)
+ {
+#ifndef __ANDROID__
+ success = fputs(buffer, logfile);
+ fflush(NULL);
+#else
+ int and_level=0;
+ switch (level) {
+ case CRAZY:
+ case ALERT:
+ case EMERG :
+ case CRIT:{
+ and_level=ANDROID_LOG_FATAL;
+ } break;
+ case ERR: {
+ and_level=ANDROID_LOG_ERROR;
+ } break;
+ case WARN: {
+ and_level=ANDROID_LOG_WARN;
+ } break;
+ case NOTICE:
+ case INFO: {
+ and_level=ANDROID_LOG_INFO;
+ } break;
+ case DEBUG :{
+ and_level=ANDROID_LOG_DEBUG;
+ } break;
+ };
+ __android_log_vprint(and_level, fromModule,
+ message, ap);
+#endif
+ }
+
+ if (extlog) extlog->LogExtern(buffer); //Replacement for network logging
+
+
+ if (success != EOF)
+ return 1;
+ else
+ return 0;
+
+}
+
+void Log::logLongString(const char *fromModule, int level,const char *message)
+{
+ int string_size=strlen(message);
+ char buffer[100];
+ const char * pointer=message;
+ for (int str_written=0; str_written<string_size;str_written+=99) {
+ strncpy(buffer,pointer,99);
+ buffer[99]=0;
+ pointer+=99;
+ log(fromModule,level,"%s",buffer);
+ }
+
+}
+
+int Log::status()
+{
+ if (instance && logfile) return 1;
+ else return 0;
+}
+
+void Log::setExternLogger(ExternLogger* login) {
+ extlog=login;
+ log("Log", Log::DEBUG, "Extern logging started");
+}
+
+
+
+
--- /dev/null
+/*
+ Copyright 2004-2005 Chris Tallon
+ Copyright 2003-2004 University Of Bradford
+
+ This file is part of VOMP.
+
+ VOMP is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ VOMP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with VOMP; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LOG_H
+#define LOG_H
+
+#include <stdio.h>
+#ifndef WIN32
+ #include <unistd.h>
+ #include <sys/time.h>
+#else
+ #include <sys/timeb.h>
+#endif
+
+#include <time.h>
+#include <string.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include "defines.h"
+
+
+class ExternLogger {
+public:
+ virtual bool LogExtern(const char* message)=0;
+};
+
+
+class Log
+{
+ public:
+ Log();
+ ~Log();
+ static Log* getInstance();
+
+ int init(int defaultLevel,const char* fileName, int enabled);
+ int shutdown();
+ int log(const char *fromModule, int level,const char *message, ...);
+ void logLongString(const char *fromModule, int level,const char *message);
+ int status();
+ void upLogLevel();
+ void downLogLevel();
+ void setExternLogger(ExternLogger* log);
+ void unsetExternLogger() {
+ extlog=NULL;
+ }
+
+
+
+ const static int CRAZY = 0; // mad crazy things that should never happen
+ const static int EMERG = 1; // human assist required NOW
+ const static int ALERT = 2; // system unusable, but happy to sit there
+ const static int CRIT = 3; // still working, but maybe about to die
+ const static int ERR = 4; // that response is not even listed...
+ const static int WARN = 5; // this could be a bad thing. still running tho
+ const static int NOTICE = 6; // significant good thing
+ const static int INFO = 7; // verbose good thing
+ const static int DEBUG = 8; // debug-level messages
+
+ private:
+ static Log* instance;
+ int initted;
+ int logLevel;
+ int enabled;
+
+ FILE *logfile;
+
+ ExternLogger* extlog;
+
+
+};
+
+#endif
+
+/*
+
+Documentation
+-------------
+
+This class is intended to be instatiated once by the core.
+For a one off use:
+
+Log::getInstance()->log("<module-name>", Log::<levelname>, "<message>");
+
+Or, a pointer can be stored and used:
+
+Log *myptr = Log::getInstance();
+
+myptr->log("<module-name>", Log::<levelname>, "<message>");
+myptr->log("<module-name>", Log::<levelname>, "<message>");
+
+Level usages are above.
+
+The message parameter in the log function can be used in the same way as printf, eg.
+
+myptr->log("<module-name>", Log::<levelname>, "Success: %s %i", stringpointer, integer);
+
+*/
#include "osd.h"
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "surfacedirectfb.h"
#include "video.h"
#include "osd.h"
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "threadp.h"
#include "videoomx.h"
#include "defines.h"
#include "osdvector.h"
-#include "log.h"
+#include "oldlog.h"
#include "videoomx.h"
#include "staticartwork.h"
#ifdef PICTURE_DECODER_OMX
#include "osd.h"
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "windowsosd.h"
#include <gdiplus.h>
#include <d2d1.h>
#include <dwrite.h>
-#include "log.h"
+#include "oldlog.h"
#include "osdvector.h"
class OsdWinVector : public OsdVector, public WindowsOsd
#include "messagequeue.h"
#include "i18n.h"
#include "boxx.h"
-#include "log.h"
+#include "oldlog.h"
#include "media.h"
#include "mediaplayer.h"
#include <time.h>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "audio.h"
#include "demuxerts.h"
#include "vdr.h"
#endif
#include <time.h>
-#include "log.h"
+#include "oldlog.h"
#include "audio.h"
#include "video.h"
#include "demuxervdr.h"
#include <time.h>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "audio.h"
#include "video.h"
#include "demuxerts.h"
along with VOMP. If not, see <https://www.gnu.org/licenses/>.
*/
-#include "log.h"
+#include "oldlog.h"
#include "audio.h"
#include "video.h"
#include "demuxervdr.h"
#include <math.h>
-#include "log.h"
+#include "oldlog.h"
#include "i18n.h"
#include "recinfo.h"
#include "recman.h"
#include "vdr.h"
-#include "log.h"
+#include "oldlog.h"
RecMan::RecMan()
{
#include "recinfo.h"
#include "mark.h"
-#include "log.h"
+#include "oldlog.h"
#include "demuxer.h"
#include "demuxerts.h"
#include "control.h"
#include "remotelirc.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#define LIRC_BUFFER_SIZE 128
*/
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "input.h"
#include "wsymbol.h"
#include "colour.h"
#include <stdlib.h>
#include <string.h>
-#include "log.h"
+#include "oldlog.h"
#include "stream.h"
Stream::~Stream()
#include <math.h>
#include <algorithm>
#include "osd.h"
-#include "log.h"
+#include "oldlog.h"
#include "video.h"
#include "teletxt/txtfont.h"
#include "osd.h"
#include "bitmap.h"
-#include "log.h"
+#include "oldlog.h"
#include "osddirectfb.h"
#include "surfaceopengl.h"
#include "osdopengl.h"
#include "bitmap.h"
-#include "log.h"
+#include "oldlog.h"
#include "mutex.h"
inline unsigned int InternalColour(unsigned int c){
#include "surfacewin.h"
#include "osdwinpixel.h"
#include "bitmap.h"
-#include "log.h"
+#include "oldlog.h"
#include <gdiplus.h>
SurfaceWin::SurfaceWin(int id)
#include "tbboxx.h"
-#include "log.h"
+#include "oldlog.h"
TBBoxx::TBBoxx()
{
#include <sstream>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "tcp.h"
#define TXTDECVBIEBU_H
#include "draintarget.h"
-#include "log.h"
+#include "oldlog.h"
/* from osdteletext begin */
along with VOMP. If not, see <https://www.gnu.org/licenses/>.
*/
-#include "log.h"
+#include "oldlog.h"
#include "demuxer.h"
#include "callback.h"
#include "util.h"
*/
#include "threadpandroid.h"
-#include "log.h"
+#include "oldlog.h"
// Undeclared functions, only for use in this file to start the thread
void threadPAndroidInternalStart(void *arg)
along with VOMP. If not, see <https://www.gnu.org/licenses/>.
*/
-#include "log.h"
+#include "oldlog.h"
#include "timers.h"
#include <errno.h>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "udp4.h"
#include <errno.h>
#include <fcntl.h>
-#include "log.h"
+#include "oldlog.h"
#include "udp6.h"
#include "message.h"
#include "messagequeue.h"
#include "recinfo.h"
-#include "log.h"
+#include "oldlog.h"
#include "channel.h"
#include "vaudioselector.h"
#include "message.h"
#include "boxstack.h"
#include "colour.h"
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "messagequeue.h"
#include "vinfo.h"
#include "boxstack.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "mediaoptions.h"
#define PICTUREFILE "/colourtest.jpg"
#include "i18n.h"
#include "boxstack.h"
#include "message.h"
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "wol.h"
#include "vserverselect.h"
#include <chrono>
#include <algorithm>
-#include "log.h"
+#include "oldlog.h"
#include "wol.h"
#include "vdpc.h"
#endif
#include "eventdispatcher.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "control.h"
#include "tcp.h"
#include "boxstack.h"
#include "channel.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "vepg.h"
#include "video.h"
#include "i18n.h"
#include "messagequeue.h"
-#include "log.h"
+#include "oldlog.h"
#include "movieinfo.h"
#include "seriesinfo.h"
#include "event.h"
#include "channel.h"
#include "boxstack.h"
#include "vdr.h"
-#include "log.h"
+#include "oldlog.h"
#include "vinfo.h"
#include "message.h"
#include "control.h"
#include "event.h"
#include "channel.h"
#include "message.h"
-#include "log.h"
+#include "oldlog.h"
#include "wmovieview.h"
#include "wseriesview.h"
#include "wpictureview.h"
along with VOMP. If not, see <https://www.gnu.org/licenses/>.
*/
-#include "log.h"
+#include "oldlog.h"
#include "demuxer.h"
#include "callback.h"
#include "util.h"
#include <chrono>
-#include "log.h"
+#include "oldlog.h"
#include "audioomx.h"
#include "demuxer.h"
#include "vdr.h"
#include "videowin.h"
-#include "log.h"
+#include "oldlog.h"
#include "dssourcefilter.h"
#include "dsallocator.h"
#include "vdr.h"
#include "vinfo.h"
#include "media.h"
#include "mediaplayer.h"
-#include "log.h"
+#include "oldlog.h"
#include "localmediafile.h"
#include "mediaoptions.h"
#include "control.h"
#include "mediaoptions.h"
#include "mediaplayer.h"
-#include "log.h"
+#include "oldlog.h"
#include "messagequeue.h"
const int VMediaView::EVENT_SLIDESHOW=100;
#include "boxstack.h"
#include "woptionpane.h"
#include "wremoteconfig.h"
-#include "log.h"
+#include "oldlog.h"
#include "option.h"
#include "vdr.h"
#include "messagequeue.h"
#include "vinfo.h"
#include "boxstack.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
VPictureBanner::VPictureBanner(bool ld, bool sl)
{
#include "input.h"
#include "vinfo.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "messagequeue.h"
#include "vradiorec.h"
#include "vrecordinglist.h"
#include "recording.h"
#include "message.h"
-#include "log.h"
+#include "oldlog.h"
#include "wmovieview.h"
#include "wseriesview.h"
#include "wpictureview.h"
#include "i18n.h"
#include "control.h"
#include "vinfo.h"
-#include "log.h"
+#include "oldlog.h"
VRecordingList::VRecordingList()
{
#include "i18n.h"
#include "control.h"
#include "vinfo.h"
-#include "log.h"
+#include "oldlog.h"
#include "movieinfo.h"
#include "seriesinfo.h"
#include "staticartwork.h"
#include "i18n.h"
#include "control.h"
#include "vinfo.h"
-#include "log.h"
+#include "oldlog.h"
#include "vrecordinglistclassic.h"
#include <math.h>
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "input.h"
#include "colour.h"
#include "video.h"
#include "control.h"
#include "boxstack.h"
#include "vinfo.h"
-#include "log.h"
+#include "oldlog.h"
#include "staticartwork.h"
#include "vtimerlist.h"
#include "event.h"
#include "vepg.h"
#include "bitmap.h"
-#include "log.h"
+#include "oldlog.h"
#include "vteletextview.h"
#include "vepgsummary.h"
#include "vepglistadvanced.h"
#include "boxstack.h"
#include "vinfo.h"
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "recinfo.h"
#include "messagequeue.h"
#include "i18n.h"
#include "bitmap.h"
#include "recinfo.h"
-#include "log.h"
+#include "oldlog.h"
#include "channel.h"
#include "vteletextview.h"
#include "messagequeue.h"
*/
-#include "log.h"
+#include "oldlog.h"
#include "input.h"
#include "vdr.h"
#include "vchannellist.h"
#include "dsallocator.h"
#include "video.h"
#include "videowin.h"
-#include "log.h"
+#include "oldlog.h"
#include "colour.h"
typedef HRESULT(__stdcall *FCT_DXVA2CreateDirect3DDeviceManager9)(UINT* pResetToken, IDirect3DDeviceManager9** ppDeviceManager);
#include "vompreswin.h"
#include "defines.h"
-#include "log.h"
+#include "oldlog.h"
#include "inputman.h"
#include "inputwin.h"
#include "util.h"
#endif
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "surface.h"
#endif
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "surface.h"
#ifndef __ANDROID__
#include "i18n.h"
-#include "log.h"
+#include "oldlog.h"
#include "surface.h"
#include <Iphlpapi.h>
#endif
#include "wol.h"
-#include "log.h"
+#include "oldlog.h"
#define _PATH_PROCNET_ARP "/proc/net/arp"
*/
#include "colour.h"
-#include "log.h"
+#include "oldlog.h"
#ifndef WIN32
#include "unistd.h"
#endif
#include "wtextbox.h"
#include "i18n.h"
#include "woptionbox.h"
-#include "log.h"
+#include "oldlog.h"
#include "vdr.h"
#include "input.h"
#include "option.h"
#include <string>
-#include "log.h"
+#include "oldlog.h"
#include "input.h"
#include "inputman.h"
#include "wsymbol.h"
#include <string.h>
#include "colour.h"
-#include "log.h"
+#include "oldlog.h"
#include "wselectlist.h"