To synchronize unsolicited messages and debug output with solicited Cisco IOS software output and prompts for a specific console
port line, auxiliary port line, or vty, use the
logging synchronous command in line configuration mode. To disable synchronization of unsolicited messages and debug output, use the no form of this command.
logging synchronous [level severity-level | all] [limit number-of-lines]
no logging synchronous [level severity-level | all] [limit number-of-lines]
Syntax Description
level
severity-level
|
(Optional) Specifies the message severity level. Messages with a severity level equal to or higher than this value are printed
asynchronously. Low numbers indicate greater severity and high numbers indicate lesser severity. The default value is 2.
|
all
|
(Optional) Specifies that all messages are printed asynchronously, regardless of the severity level.
|
limit
number-of-lines
|
(Optional) Specifies the number of buffer lines to be queued for the terminal, after which new messages are dropped. The default
value is 20.
|
Command Default
This command is disabled.
If you do not specify a severity level, the default value of 2 is assumed.
If you do not specify the maximum number of buffers to be queued, the default value of 20 is assumed.
Command Modes
Line configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends
on your feature set, platform, and platform hardware.
|
Usage Guidelines
When synchronous logging of unsolicited messages and debug output is turned on, unsolicited Cisco IOS software output is displayed
on the console or printed after solicited Cisco IOS software output is displayed or printed. This keeps unsolicited messages
and debug output from being interspersed with solicited software output and prompts.

Tip
|
This command is useful for keeping system messages from interrupting your typing. By default, messages will appear immediately
when they are processed by the system, and the CLI cursor will appear at the end of the displayed message. For example, the
line “Configured by console from console” may be printed to the screen, interrupting whatever command you are currently typing.
The logging synchronous command allows you to avoid these potentially annoying interruptions without have to turn off logging to the console entirely.
|
When this command is enabled, unsolicited messages and debug output are displayed on a separate line than user input. After
the unsolicited messages are displayed, the CLI returns to the user prompt.

Note
|
This command is also useful for allowing you to continue typing when debugging is enabled.
|
When specifying a severity level number, consider that for the logging system, low numbers indicate greater severity and high
numbers indicate lesser severity.
When a message queue limit of a terminal line is reached, new messages are dropped from the line, although these messages
might be displayed on other lines. If messages are dropped, the notice “
%SYS-3-MSGLOST number-of-messages due to overflow” follows any messages that are displayed. This notice is displayed only on the terminal that lost the messages.
It is not sent to any other lines, any logging servers, or the logging buffer.

Caution
|
By configuring abnormally large message queue limits and setting the terminal to “terminal monitor” on a terminal that is
accessible to intruders, you expose yourself to “denial of service” attacks. An intruder could carry out the attack by putting
the terminal in synchronous output mode, making a Telnet connection to a remote host, and leaving the connection idle. This
could cause large numbers of messages to be generated and queued, and these messages could consume all available RAM. You
should guard against this type of attack through proper configuration.
|
Examples
In the following example, a system message appears in the middle of typing the show running-config command:
Router(config-line)# end
Router# show ru
2w1d: %SYS-5-CONFIG_I: Configured from console by consolenning-config
.
.
.
The user then enables synchronous logging for the current line (indicated by the * symbol in the show line command), after which the system displays the system message on a separate line, and returns the user to the prompt to allow
the user to finish typing the command on a single line:
Router# show line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 0 3 0/0 -
.
.
.
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# line 0
Router(config-line)# logging syn
<tab>
Router(config-line)# logging synchronous
Router(config-line)# end
Router# show ru
2w1d: %SYS-5-CONFIG_I: Configured from console by console
Router# show running-config
In the following example, synchronous logging for line 4 is enabled with a severity level of 6. Then synchronous logging for
line 2 is enabled with a severity level of 7 and is specified with a maximum number of buffer lines of 1,000.
Router(config)# line 4
Router(config-line)# logging synchronous level 6
Router(config-line)# exit
Router(config)# line 2
Router(config-line)# logging synchronous level 7 limit 1000
Router(config-line)# end
Router#