diff options
author | ajs <ajs> | 2004-12-07 15:39:31 +0000 |
---|---|---|
committer | ajs <ajs> | 2004-12-07 15:39:31 +0000 |
commit | 274a4a4447b13f89f8237156a887d05a24a73cc6 (patch) | |
tree | d5c2c6ee94bb77ef4346bcc07834808a75210bfd /doc/basic.texi | |
parent | 5e76477456ce8bc4a1eeaccb5c5e1d3d99ab1300 (diff) |
2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* bgp_main.c: (main) The 2nd argument to openzlog has been removed.
* isis_main.c: (main) The 2nd argument to openzlog has been removed.
* ospf6_main.c: (main) The 2nd argument to openzlog has been removed.
Note that stdout logging will no longer be enabled by default when
not running as a daemon.
* ospf_main.c: (main) The 2nd argument to openzlog has been removed.
* rip_main.c: (main) The 2nd argument to openzlog has been removed.
* ripng_main.c: (main) The 2nd argument to openzlog has been removed.
* main.c: (main) The 2nd argument to openzlog has been removed.
So stdout logging will no longer be enabled by default.
* irdp_main.c: (irdp_finish) Reduce severity of shutdown message
from LOG_WARNING to LOG_INFO.
* vtysh.c: Make several functions static instead of global.
Added several commands to support destination-specific logging levels.
(vtysh_completion) This function is unused, so comment it out.
* basic.texi: Document new logging features. Separate basic config
commands from basic VTY commands.
* log.h: Replace struct zlog flags and maskpri fields with maxlvl
array to support individual logging levels for each destination.
Remove the 2nd argument to openzlog since the default logging config
should be standardized inside the library. Replaced the
zlog_set_flag and zlog_reset_flag functions with zlog_set_level.
And zlog_set_file now requires an additional log_level argument.
Declare zlog_proto_names for use inside command.c in the
"show logging" command. Added defines useful for command
construction.
* log.c: (vzlog) Decide where to send the message based on the
individual logging levels configured for each destination.
Remove support for ZLOG_STDERR since it was never actually used.
Support record-priority for terminal monitors.
(zlog_signal,zlog_backtrace_sigsafe) Support destination-specific
logging levels. Remove stderr support (was never used). Added
support for terminal monitor logging.
(_zlog_assert_failed) Increase message severity to LOG_EMERG.
(openzlog) Remove 2nd argument since default config should be
standardized in library. By default, terminal monitoring
is set to debug, and all other logging is disabled.
(zlog_set_flag,zlog_reset_flag) Removed.
(zlog_set_level) New function to replace zlog_set_flag and
zlog_reset_flag. Supports destination-specific logging levels.
(zlog_set_file,zlog_reset_file) Support file-specific logging level.
(zlog_rotate) Log an error message if fopen fails, and support
new file-specific logging level.
* command.h: Change DEFUN_CMD_FUNC_DECL and DEFUN_CMD_FUNC_TEXT so that
command functions will be static instead of global. Remove
declarations for config_exit and config_help. Define new macros
DEFUNSH_ATTR, DEFUNSH_HIDDEN, and DEFUNSH_DEPRECATED so we can
have deprecated commands in vtysh. Similarly, for completeness,
define macros ALIAS_SH, ALIAS_SH_HIDDEN, and ALIAS_SH_DEPRECATED.
Also, fix bug in ALIAS_ATTR macro (didn't matter because it
was never used).
* command.c: Make many functions static instead of global.
(facility_name,facility_match,level_match) New functions
to support enhanced destination-specific logging levels.
(config_write_host) Support new destination-specific logging levels.
(config_logmsg) Added new "logmsg" command to help test logging
system.
(show_logging) Added "show logging" command to show the current
configuration of the logging system.
(config_log_stdout_level) Support explicit stdout logging level.
(no_config_log_stdout) Now takes optional LEVEL arg.
(config_log_monitor,config_log_monitor_level,no_config_log_monitor)
New commands creating new "log monitor" commands to set terminal
monitoring log level.
(config_log_file_level) Support explicit file logging level.
(config_log_syslog_level) Support explicit syslog logging level.
(config_log_facility,no_config_log_facility) Implement new
"log facility" command.
(cmd_init) Add hooks for new commands: "show logging", "logmsg",
"log stdout <level>", "log monitor", "log monitor <level>",
"no log monitor", "log file <filename> <level>",
"no log file <filename> <level>", "log syslog <level>",
"log facility", and "no log facility".
* vty.h: Added a "level" argument to vty_log so it can support
"log record-priority". Declare new function vty_log_fixed for
use in signal handlers.
* vty.c: (vty_log,vty_log_out) Added a "level" argument to support
"log record-priority" for vty terminal monitors.
(vty_down_level) Use config_exit_cmd.func instead of calling
config_exit directly (since command functions will now be static
instead of global).
(vty_log_fixed) New function to send terminal monitor messages
from inside a signal handler.
Diffstat (limited to 'doc/basic.texi')
-rw-r--r-- | doc/basic.texi | 141 |
1 files changed, 110 insertions, 31 deletions
diff --git a/doc/basic.texi b/doc/basic.texi index ab976445..cbbdea49 100644 --- a/doc/basic.texi +++ b/doc/basic.texi @@ -15,9 +15,10 @@ The following sections discuss commands common to all the routing daemons. @menu +* Terminal Mode Commands:: Common commands used in a VTY * Config Commands:: Commands used in config files * Common Invocation Options:: Starting the daemons -* Virtual Terminal Interfaces:: Interacting with the daemons +* Virtual Terminal Interfaces:: Interacting with the daemons @end menu @@ -78,47 +79,85 @@ accept connections. Set enable password. @end deffn +@deffn Command {log trap @var{level}} {} +@deffnx Command {no log trap} {} +These commands are deprecated and are present only for historical compatibility. +The log trap command sets the current logging level for all enabled +logging destinations, and it sets the default for all future logging commands +that do not specify a level. The normal default +logging level is debugging. The @code{no} form of the command resets +the default level for future logging commands to debugging, but it does +not change the logging level of existing logging destinations. +@end deffn + + @deffn Command {log stdout} {} +@deffnx Command {log stdout @var{level}} {} @deffnx Command {no log stdout} {} -Set logging output to stdout. +Enable logging output to stdout. +If the optional second argument specifying the +logging level is not present, the default logging level (typically debugging, +but can be changed using the deprecated @code{log trap} command) will be used. +The @code{no} form of the command disables logging to stdout. +The @code{level} argument must have one of these values: +emergencies, alerts, critical, errors, warnings, notifications, informational, or debugging. Note that the existing code logs its most important messages +with severity @code{errors}. @end deffn @deffn Command {log file @var{filename}} {} -If you want to log into a file please specify @code{filename} as -follows. +@deffnx Command {log file @var{filename} @var{level}} {} +@deffnx Command {no log file} {} +If you want to log into a file, please specify @code{filename} as +in this example: @example -log file /usr/local/etc/bgpd.log +log file /var/log/quagga/bgpd.log informational @end example +If the optional second argument specifying the +logging level is not present, the default logging level (typically debugging, +but can be changed using the deprecated @code{log trap} command) will be used. +The @code{no} form of the command disables logging to a file. @end deffn @deffn Command {log syslog} {} +@deffnx Command {log syslog @var{level}} {} @deffnx Command {no log syslog} {} -Set logging output to syslog. -@end deffn - -@deffn Command {write terminal} {} -Displays the current configuration to the vty interface. -@end deffn - -@deffn Command {write file} {} -Write current configuration to configuration file. -@end deffn - -@deffn Command {configure terminal} {} -Change to configuration mode. This command is the first step to -configuration. +Enable logging output to syslog. +If the optional second argument specifying the +logging level is not present, the default logging level (typically debugging, +but can be changed using the deprecated @code{log trap} command) will be used. +The @code{no} form of the command disables logging to syslog. @end deffn -@deffn Command {terminal length @var{<0-512>}} {} -Set terminal display length to @var{<0-512>}. If length is 0, no -display control is performed. +@deffn Command {log monitor} {} +@deffnx Command {log monitor @var{level}} {} +@deffnx Command {no log monitor} {} +Enable logging output to vty terminals that have enabled logging +using the @code{terminal monitor} command. +By default, monitor logging is enabled at the debugging level, but this +command (or the deprecated @code{log trap} command) can be used to change +the monitor logging level. +If the optional second argument specifying the +logging level is not present, the default logging level (typically debugging, +but can be changed using the deprecated @code{log trap} command) will be used. +The @code{no} form of the command disables logging to terminal monitors. @end deffn -@deffn Command {who} {} +@deffn Command {log facility @var{facility}} {} +@deffnx Command {no log facility} {} +This command changes the facility used in syslog messages. The default +facility is @code{daemon}. The @code{no} form of the command resets +the facility to the default @code{daemon} facility. @end deffn -@deffn Command {list} {} -List commands. +@deffn Command {log record-priority} {} +@deffnx Command {no log record-priority} {} +To include the severity in all messages logged to a file, to stdout, or to +a terminal monitor (i.e. anything except syslog), +use the @code{log record-priority} global configuration command. +To disable this option, use the @code{no} form of the command. By default, +the severity level is not included in logged messages. Note: some +versions of syslogd (including Solaris) can be configured to include +the facility and level in the messages emitted. @end deffn @deffn Command {service password-encryption} {} @@ -134,10 +173,6 @@ Set system wide line configuration. This configuration command applies to all VTY interfaces. @end deffn -@deffn Command {show version} {} -Show the current version of @value{PACKAGE_NAME} and its build host information. -@end deffn - @deffn Command {line vty} {} Enter vty configuration mode. @end deffn @@ -167,8 +202,6 @@ Do not perform timeout at all. This command is as same as Restrict vty connections with an access list. @end deffn - - @node Sample Config File @subsection Sample Config File @@ -204,6 +237,52 @@ comment and the password is set to 'zebra!password'. +@node Terminal Mode Commands +@section Terminal Mode Commands + +@deffn Command {write terminal} {} +Displays the current configuration to the vty interface. +@end deffn + +@deffn Command {write file} {} +Write current configuration to configuration file. +@end deffn + +@deffn Command {configure terminal} {} +Change to configuration mode. This command is the first step to +configuration. +@end deffn + +@deffn Command {terminal length @var{<0-512>}} {} +Set terminal display length to @var{<0-512>}. If length is 0, no +display control is performed. +@end deffn + +@deffn Command {who} {} +Show a list of currently connected vty sessions. +@end deffn + +@deffn Command {list} {} +List all available commands. +@end deffn + +@deffn Command {show version} {} +Show the current version of @value{PACKAGE_NAME} and its build host information. +@end deffn + +@deffn Command {show logging} {} +Shows the current configuration of the logging system. This includes +the status of all logging destinations. +@end deffn + +@deffn Command {logmsg @var{level} @var{message}} {} +Send a message to all logging destinations that are enabled for messages +of the given severity. +@end deffn + + + + @node Common Invocation Options @section Common Invocation Options @c COMMON_OPTIONS |