diff options
author | horchi <vdr@jwendel.de> | 2017-03-05 16:48:30 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-05 16:48:30 +0100 |
commit | bf558fd824c7ab8c794448f718b364ad403a706a (patch) | |
tree | e0ba2269c08ccc9c9bd9c336df06b1fa6fce5ec6 /def.c | |
download | vdr-plugin-pin-bf558fd824c7ab8c794448f718b364ad403a706a.tar.gz vdr-plugin-pin-bf558fd824c7ab8c794448f718b364ad403a706a.tar.bz2 |
git init0.1.16
Diffstat (limited to 'def.c')
-rw-r--r-- | def.c | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -0,0 +1,41 @@ +/* + * pin.c: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * Date: 11.04.05 - 12.02.07, horchi + */ + +//*************************************************************************** +// Include +//*************************************************************************** + +#include <stdarg.h> +#include <syslog.h> + +#include "def.h" + +int logLevel = eloOff; + +//*************************************************************************** +// Tell +//*************************************************************************** + +int tell(int eloquence, const char* format, ...) +{ + char tmp[1024]; + va_list ap; + + va_start(ap, format); + + if (logLevel >= eloquence) + { + vsnprintf(tmp + 5, sizeof tmp - 5, format, ap); + memcpy(tmp, "[pin] ", 5); + syslog(LOG_INFO, "%s", tmp); + } + + va_end(ap); + + return success; +} |