diff options
author | phintuka <phintuka> | 2007-01-01 06:38:01 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-01-01 06:38:01 +0000 |
commit | 8edd5136642335cd4ca842bf78bdd43cac78ef28 (patch) | |
tree | a9acd941ccf1f85d63fba1076dca17effc267eff | |
parent | 169559bb92998e8219f5c427259fc45ec36cdec1 (diff) | |
download | xineliboutput-8edd5136642335cd4ca842bf78bdd43cac78ef28.tar.gz xineliboutput-8edd5136642335cd4ca842bf78bdd43cac78ef28.tar.bz2 |
x_syslog is now defined in logdefs.h
-rw-r--r-- | xine/post.c | 52 |
1 files changed, 10 insertions, 42 deletions
diff --git a/xine/post.c b/xine/post.c index 088e316d..192bf773 100644 --- a/xine/post.c +++ b/xine/post.c @@ -32,48 +32,16 @@ #include "post.h" -#if 1 -# include <sys/types.h> -# include <sys/syscall.h> -# include <unistd.h> -# include <linux/unistd.h> -# include <errno.h> -# include <syslog.h> - -# define LOG_MODULENAME "[xine-post] " -# include "../logdefs.h" - - /* from xine_frontend.c or vdr tools.c: */ - extern int SysLogLevel; /* errors and info, no debug */ - /* from xine_frontend.c: */ - extern int LogToSysLog; /* log to syslog instead of console */ - -# if !defined(XINELIBOUTPUT_DEBUG_STDOUT) && \ - !defined(XINELIBOUTPUT_DEBUG_STDERR) - -# undef x_syslog - static void x_syslog(int level, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); - static void x_syslog(int level, const char *fmt, ...) - { - va_list argp; - char buf[512]; - va_start(argp, fmt); - vsnprintf(buf, 512, fmt, argp); - if(!LogToSysLog) { - fprintf(stderr,"[%ld] " LOG_MODULENAME "%s\n", syscall(__NR_gettid), buf); - } else { - syslog(level, "[%ld] " LOG_MODULENAME "%s", syscall(__NR_gettid), buf); - } - va_end(argp); - } -# endif - -#else -# define LOGERR(x...) -# define LOGMSG(x...) -# define LOGDBG(x...) -# define TRACELINE (void) -#endif +#include <sys/types.h> +#include <sys/syscall.h> +#include <unistd.h> +#include <linux/unistd.h> +#include <errno.h> +#include <syslog.h> + +#define NEED_x_syslog +#define LOG_MODULENAME "[xine-post] " +#include "../logdefs.h" #define fe_t post_plugins_t |