mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 14:29:47 +00:00
2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* command.h: Remove fields log_stdout and log_syslog from struct host, since they are just trying to duplicate information in the zlog_default structure. Note that this fixes a bug since those fields were not registering any logging that was established in the initial call to openzlog (this affects only the zebra and ospf6d daemons). It is probably a bug to turn on any logging by default in the call to openzlog. * command.c: (config_write_host) Get logging info from zlog_default instead of now-removed fields host.log_stdout and host.log_syslog. (config_log_stdout,no_config_log_stdout) Do not set now-removed field host.log_stdout, since this info is recorded in zlog_default. (config_log_file) Use XSTRDUP (instead of strdup) to set host.logfile. (config_log_syslog,config_log_syslog_facility,no_config_log_syslog) Do not set now-removed field host.log_syslog, since this info is recorded in zlog_default.
This commit is contained in:
parent
1210fa6674
commit
56f2069a03
@ -1,3 +1,21 @@
|
||||
2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||
|
||||
* command.h: Remove fields log_stdout and log_syslog from struct host,
|
||||
since they are just trying to duplicate information in the
|
||||
zlog_default structure. Note that this fixes a bug since those
|
||||
fields were not registering any logging that was established
|
||||
in the initial call to openzlog (this affects only the zebra and
|
||||
ospf6d daemons). It is probably a bug to turn on any logging by
|
||||
default in the call to openzlog.
|
||||
* command.c: (config_write_host) Get logging info from zlog_default
|
||||
instead of now-removed fields host.log_stdout and host.log_syslog.
|
||||
(config_log_stdout,no_config_log_stdout) Do not set now-removed field
|
||||
host.log_stdout, since this info is recorded in zlog_default.
|
||||
(config_log_file) Use XSTRDUP (instead of strdup) to set host.logfile.
|
||||
(config_log_syslog,config_log_syslog_facility,no_config_log_syslog)
|
||||
Do not set now-removed field host.log_syslog, since this info is
|
||||
recorded in zlog_default.
|
||||
|
||||
2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||
|
||||
* version.h.in: Remove declaration for pid_output_lock, this function
|
||||
|
@ -545,10 +545,10 @@ config_write_host (struct vty *vty)
|
||||
if (host.logfile)
|
||||
vty_out (vty, "log file %s%s", host.logfile, VTY_NEWLINE);
|
||||
|
||||
if (host.log_stdout)
|
||||
if (zlog_default->flags & ZLOG_STDOUT)
|
||||
vty_out (vty, "log stdout%s", VTY_NEWLINE);
|
||||
|
||||
if (host.log_syslog)
|
||||
if (zlog_default->flags & ZLOG_SYSLOG)
|
||||
{
|
||||
vty_out (vty, "log syslog");
|
||||
if (zlog_default->facility != LOG_DAEMON)
|
||||
@ -2966,7 +2966,6 @@ DEFUN (config_log_stdout,
|
||||
"Logging goes to stdout\n")
|
||||
{
|
||||
zlog_set_flag (NULL, ZLOG_STDOUT);
|
||||
host.log_stdout = 1;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -2978,7 +2977,6 @@ DEFUN (no_config_log_stdout,
|
||||
"Cancel logging to stdout\n")
|
||||
{
|
||||
zlog_reset_flag (NULL, ZLOG_STDOUT);
|
||||
host.log_stdout = 0;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -3031,7 +3029,7 @@ DEFUN (config_log_file,
|
||||
if (host.logfile)
|
||||
XFREE (MTYPE_TMP, host.logfile);
|
||||
|
||||
host.logfile = strdup (argv[0]);
|
||||
host.logfile = XSTRDUP (MTYPE_TMP, argv[0]);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@ -3061,7 +3059,6 @@ DEFUN (config_log_syslog,
|
||||
"Logging goes to syslog\n")
|
||||
{
|
||||
zlog_set_flag (NULL, ZLOG_SYSLOG);
|
||||
host.log_syslog = 1;
|
||||
zlog_default->facility = LOG_DAEMON;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@ -3094,7 +3091,6 @@ DEFUN (config_log_syslog_facility,
|
||||
int facility = LOG_DAEMON;
|
||||
|
||||
zlog_set_flag (NULL, ZLOG_SYSLOG);
|
||||
host.log_syslog = 1;
|
||||
|
||||
if (strncmp (argv[0], "kern", 1) == 0)
|
||||
facility = LOG_KERN;
|
||||
@ -3146,7 +3142,6 @@ DEFUN (no_config_log_syslog,
|
||||
"Cancel logging to syslog\n")
|
||||
{
|
||||
zlog_reset_flag (NULL, ZLOG_SYSLOG);
|
||||
host.log_syslog = 0;
|
||||
zlog_default->facility = LOG_DAEMON;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -46,12 +46,6 @@ struct host
|
||||
/* Log filename. */
|
||||
char *logfile;
|
||||
|
||||
/* Log stdout. */
|
||||
u_char log_stdout;
|
||||
|
||||
/* Log syslog. */
|
||||
u_char log_syslog;
|
||||
|
||||
/* config file name of this host */
|
||||
char *config;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user