Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/wl_log.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/wl_log.cc | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/wl_log.cc b/noncore/net/wellenreiter/libwellenreiter/source/wl_log.cc deleted file mode 100644 index 7adaba8..0000000 --- a/noncore/net/wellenreiter/libwellenreiter/source/wl_log.cc +++ b/dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Small functions to log to syslog | ||
3 | * | ||
4 | * $Id$ | ||
5 | */ | ||
6 | |||
7 | #include "wl_log.hh" | ||
8 | |||
9 | /* Log to syslog INFO */ | ||
10 | void wl_loginfo(const char *fmt,...) | ||
11 | { | ||
12 | |||
13 | char buffer[4096]; | ||
14 | va_list ap; | ||
15 | |||
16 | memset(buffer, 0, sizeof(buffer)); | ||
17 | va_start(ap, fmt); | ||
18 | vsnprintf(buffer, sizeof(buffer)-1, fmt, ap); | ||
19 | va_end(ap); | ||
20 | |||
21 | openlog("libwellenreiter", LOG_PID, LOG_SYSLOG); | ||
22 | syslog(LOG_INFO, "(info) %s", buffer); | ||
23 | closelog(); | ||
24 | |||
25 | #ifdef DEBUG | ||
26 | fprintf(stderr, "(info) %s\n", buffer); | ||
27 | #endif | ||
28 | |||
29 | } | ||
30 | |||
31 | /* Log to syslog ERR */ | ||
32 | void wl_logerr(const char *fmt,...) | ||
33 | { | ||
34 | |||
35 | char buffer[4096]; | ||
36 | va_list ap; | ||
37 | |||
38 | memset(buffer, 0, sizeof(buffer)); | ||
39 | va_start(ap, fmt); | ||
40 | vsnprintf(buffer, sizeof(buffer)-1, fmt, ap); | ||
41 | va_end(ap); | ||
42 | |||
43 | openlog("libwellenreiter", LOG_PID, LOG_SYSLOG); | ||
44 | syslog(LOG_INFO, "(err) %s", buffer); | ||
45 | closelog(); | ||
46 | |||
47 | #ifdef DEBUG | ||
48 | fprintf(stderr, "(err) %s\n", buffer); | ||
49 | #endif | ||
50 | |||
51 | } | ||