diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-12-08 19:41:21 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-12-08 19:41:21 +0000 |
commit | 76fef0a5d02800afa368b79abf4393eda46abc4c (patch) | |
tree | b94c2cabf9b94b51ea77bba17ab879e89b514cc4 | |
parent | 9cff4fbac91bdd63acbed23b732d76c56177ca62 (diff) | |
download | busybox-w32-76fef0a5d02800afa368b79abf4393eda46abc4c.tar.gz busybox-w32-76fef0a5d02800afa368b79abf4393eda46abc4c.tar.bz2 busybox-w32-76fef0a5d02800afa368b79abf4393eda46abc4c.zip |
Patch from Gennady Feldman <gfeldman@mail.com> to make syslogd not log
when compiled for remote logging. Not the ideal way to fix it (it should
really be a runtime switch), but good enough for now I guess...
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 8 | ||||
-rw-r--r-- | syslogd.c | 8 |
3 files changed, 10 insertions, 8 deletions
@@ -46,6 +46,8 @@ | |||
46 | * Jim Gleason <jimg@lineo.com> -- fixed tar so it no longer breaks | 46 | * Jim Gleason <jimg@lineo.com> -- fixed tar so it no longer breaks |
47 | hard links. | 47 | hard links. |
48 | * Matt Kraai -- logger now logs all arguments, not just the first | 48 | * Matt Kraai -- logger now logs all arguments, not just the first |
49 | * Gennady Feldman -- syslogd no longer logs to localhost if compiled | ||
50 | for remote logging... | ||
49 | 51 | ||
50 | 52 | ||
51 | -Erik Andersen | 53 | -Erik Andersen |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index d82aa63fd..bb0df8c51 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -161,9 +161,6 @@ static void logMessage (int pri, char *msg) | |||
161 | 161 | ||
162 | /* todo: supress duplicates */ | 162 | /* todo: supress duplicates */ |
163 | 163 | ||
164 | /* now spew out the message to wherever it is supposed to go */ | ||
165 | message("%s %s %s %s\n", timestamp, LocalHostName, res, msg); | ||
166 | |||
167 | #ifdef BB_FEATURE_REMOTE_LOG | 164 | #ifdef BB_FEATURE_REMOTE_LOG |
168 | /* send message to remote logger */ | 165 | /* send message to remote logger */ |
169 | if ( -1 != remotefd){ | 166 | if ( -1 != remotefd){ |
@@ -184,8 +181,11 @@ static void logMessage (int pri, char *msg) | |||
184 | error_msg_and_die("syslogd: cannot write to remote file handle on" | 181 | error_msg_and_die("syslogd: cannot write to remote file handle on" |
185 | "%s:%d\n",RemoteHost,RemotePort); | 182 | "%s:%d\n",RemoteHost,RemotePort); |
186 | } | 183 | } |
187 | } | 184 | } else |
188 | #endif | 185 | #endif |
186 | /* now spew out the message to wherever it is supposed to go */ | ||
187 | message("%s %s %s %s\n", timestamp, LocalHostName, res, msg); | ||
188 | |||
189 | 189 | ||
190 | } | 190 | } |
191 | 191 | ||
@@ -161,9 +161,6 @@ static void logMessage (int pri, char *msg) | |||
161 | 161 | ||
162 | /* todo: supress duplicates */ | 162 | /* todo: supress duplicates */ |
163 | 163 | ||
164 | /* now spew out the message to wherever it is supposed to go */ | ||
165 | message("%s %s %s %s\n", timestamp, LocalHostName, res, msg); | ||
166 | |||
167 | #ifdef BB_FEATURE_REMOTE_LOG | 164 | #ifdef BB_FEATURE_REMOTE_LOG |
168 | /* send message to remote logger */ | 165 | /* send message to remote logger */ |
169 | if ( -1 != remotefd){ | 166 | if ( -1 != remotefd){ |
@@ -184,8 +181,11 @@ static void logMessage (int pri, char *msg) | |||
184 | error_msg_and_die("syslogd: cannot write to remote file handle on" | 181 | error_msg_and_die("syslogd: cannot write to remote file handle on" |
185 | "%s:%d\n",RemoteHost,RemotePort); | 182 | "%s:%d\n",RemoteHost,RemotePort); |
186 | } | 183 | } |
187 | } | 184 | } else |
188 | #endif | 185 | #endif |
186 | /* now spew out the message to wherever it is supposed to go */ | ||
187 | message("%s %s %s %s\n", timestamp, LocalHostName, res, msg); | ||
188 | |||
189 | 189 | ||
190 | } | 190 | } |
191 | 191 | ||