author | mjm <mjm> | 2002-12-27 16:35:28 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-12-27 16:35:28 (UTC) |
commit | 3cb928900ffb1d2799bd7e8e1871aaf8d89b56cf (patch) (unidiff) | |
tree | 180016a8feae9e40c3e6b8be62b518bdf8ef18fc /noncore/net/wellenreiter/libwellenreiter/source/log.cc | |
parent | e6aaae74f39e3aed4dc3c186c56f92cef8c7da09 (diff) | |
download | opie-3cb928900ffb1d2799bd7e8e1871aaf8d89b56cf.zip opie-3cb928900ffb1d2799bd7e8e1871aaf8d89b56cf.tar.gz opie-3cb928900ffb1d2799bd7e8e1871aaf8d89b56cf.tar.bz2 |
cleanup, new protocol, renaming of some functions, GUI has to update!
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/log.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/log.cc | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/log.cc b/noncore/net/wellenreiter/libwellenreiter/source/log.cc deleted file mode 100644 index af7f909..0000000 --- a/noncore/net/wellenreiter/libwellenreiter/source/log.cc +++ b/dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Small functions to log to syslog | ||
3 | * | ||
4 | * $Id$ | ||
5 | */ | ||
6 | |||
7 | #include "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 | } | ||