Make no local logging a runtime option for network logging...
This commit is contained in:
@ -1176,6 +1176,7 @@ const char syslogd_usage[] =
|
|||||||
"\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n"
|
"\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n"
|
||||||
#ifdef BB_FEATURE_REMOTE_LOG
|
#ifdef BB_FEATURE_REMOTE_LOG
|
||||||
"\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
|
"\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
|
||||||
|
"\t-N\t\tDo not log anything locally -- network logging only.\n"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
@ -1707,6 +1707,7 @@ Options:
|
|||||||
-K Do not start up the klogd process
|
-K Do not start up the klogd process
|
||||||
-O FILE Use an alternate log file (default=/var/log/messages)
|
-O FILE Use an alternate log file (default=/var/log/messages)
|
||||||
-R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
|
-R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
|
||||||
|
-N Do not log anything locally -- network logging only
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -2261,4 +2262,4 @@ Enrique Zanardi <ezanardi@ull.es>
|
|||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
# $Id: busybox.pod,v 1.77 2000/11/17 17:23:16 andersen Exp $
|
# $Id: busybox.pod,v 1.78 2000/12/08 19:52:01 andersen Exp $
|
||||||
|
@ -2991,6 +2991,7 @@
|
|||||||
-K Do not start up the klogd process
|
-K Do not start up the klogd process
|
||||||
-O FILE Use an alternate log file (default=/var/log/messages)
|
-O FILE Use an alternate log file (default=/var/log/messages)
|
||||||
-R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
|
-R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
|
||||||
|
-N Do not log anything locally -- network logging only
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ static char *RemoteHost;
|
|||||||
static int RemotePort = 514;
|
static int RemotePort = 514;
|
||||||
/* To remote log or not to remote log, that is the question. */
|
/* To remote log or not to remote log, that is the question. */
|
||||||
static int doRemoteLog = FALSE;
|
static int doRemoteLog = FALSE;
|
||||||
|
static int local_logging = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note: There is also a function called "message()" in init.c */
|
/* Note: There is also a function called "message()" in init.c */
|
||||||
@ -181,7 +182,8 @@ static void logMessage (int pri, char *msg)
|
|||||||
error_msg_and_die("syslogd: cannot write to remote file handle on"
|
error_msg_and_die("syslogd: cannot write to remote file handle on"
|
||||||
"%s:%d\n",RemoteHost,RemotePort);
|
"%s:%d\n",RemoteHost,RemotePort);
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
if (local_logging == TRUE)
|
||||||
#endif
|
#endif
|
||||||
/* now spew out the message to wherever it is supposed to go */
|
/* now spew out the message to wherever it is supposed to go */
|
||||||
message("%s %s %s %s\n", timestamp, LocalHostName, res, msg);
|
message("%s %s %s %s\n", timestamp, LocalHostName, res, msg);
|
||||||
@ -529,6 +531,9 @@ extern int syslogd_main(int argc, char **argv)
|
|||||||
doRemoteLog = TRUE;
|
doRemoteLog = TRUE;
|
||||||
stopDoingThat = TRUE;
|
stopDoingThat = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case 'N':
|
||||||
|
local_logging = FALSE;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
usage(syslogd_usage);
|
usage(syslogd_usage);
|
||||||
|
@ -86,6 +86,7 @@ static char *RemoteHost;
|
|||||||
static int RemotePort = 514;
|
static int RemotePort = 514;
|
||||||
/* To remote log or not to remote log, that is the question. */
|
/* To remote log or not to remote log, that is the question. */
|
||||||
static int doRemoteLog = FALSE;
|
static int doRemoteLog = FALSE;
|
||||||
|
static int local_logging = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note: There is also a function called "message()" in init.c */
|
/* Note: There is also a function called "message()" in init.c */
|
||||||
@ -181,7 +182,8 @@ static void logMessage (int pri, char *msg)
|
|||||||
error_msg_and_die("syslogd: cannot write to remote file handle on"
|
error_msg_and_die("syslogd: cannot write to remote file handle on"
|
||||||
"%s:%d\n",RemoteHost,RemotePort);
|
"%s:%d\n",RemoteHost,RemotePort);
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
if (local_logging == TRUE)
|
||||||
#endif
|
#endif
|
||||||
/* now spew out the message to wherever it is supposed to go */
|
/* now spew out the message to wherever it is supposed to go */
|
||||||
message("%s %s %s %s\n", timestamp, LocalHostName, res, msg);
|
message("%s %s %s %s\n", timestamp, LocalHostName, res, msg);
|
||||||
@ -529,6 +531,9 @@ extern int syslogd_main(int argc, char **argv)
|
|||||||
doRemoteLog = TRUE;
|
doRemoteLog = TRUE;
|
||||||
stopDoingThat = TRUE;
|
stopDoingThat = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case 'N':
|
||||||
|
local_logging = FALSE;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
usage(syslogd_usage);
|
usage(syslogd_usage);
|
||||||
|
1
usage.c
1
usage.c
@ -1176,6 +1176,7 @@ const char syslogd_usage[] =
|
|||||||
"\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n"
|
"\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n"
|
||||||
#ifdef BB_FEATURE_REMOTE_LOG
|
#ifdef BB_FEATURE_REMOTE_LOG
|
||||||
"\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
|
"\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n"
|
||||||
|
"\t-N\t\tDo not log anything locally -- network logging only.\n"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user