Commit Message
On Fri, Dec 02, 2005, Lauri Tischler wrote:
> How do you limit VDR-log to user.log only.
> Now it writes them all over the place,
> debug, syslog, messages, etc.
Not sure what you're asking for, but I use the attached patch
since I don't want vdr to write into syslog.
You need the following in Make.config to activate it:
CXXFLAGS += -DLOG_TO_STDOUT
HTH,
Johannes
@@ -26,9 +26,15 @@ typedef unsigned long long int uint64;
extern int SysLogLevel;
+#ifdef LOG_TO_STDOUT
+#define esyslog(f, a...) void( (SysLogLevel > 0) ? void(printf(f, ## a) + putchar('\n')) : void() )
+#define isyslog(f, a...) void( (SysLogLevel > 1) ? void(printf(f, ## a) + putchar('\n')) : void() )
+#define dsyslog(f, a...) void( (SysLogLevel > 2) ? void(printf(f, ## a) + putchar('\n')) : void() )
+#else
#define esyslog(a...) void( (SysLogLevel > 0) ? syslog(LOG_ERR, a) : void() )
#define isyslog(a...) void( (SysLogLevel > 1) ? syslog(LOG_INFO, a) : void() )
#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog(LOG_DEBUG, a) : void() )
+#endif
#define LOG_ERROR esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__)
#define LOG_ERROR_STR(s) esyslog("ERROR: %s: %m", s)