Enabling and disabling CLI message prefixes

When message prefixes are enabled, a CLI command returns a message that is prefixed with “Error”, “Warning”, or “Information” to indicate the type of message.

  1. Type “session show-message-type enable” to enable the display of prefixes with the returned message.
  2. Type “session show-message-type disable” to disable the display of prefixes with the returned message.

The syntax is as follows:

session show-message-type [enable|disable]

The message prefixes setting is not saved when the switch is rebooted. The message prefixes are disabled on all CLI sessions by default.

The following example shows returned messages of each of the three message types.

Figure 31: Message prefixes
switch(config)# router rip
Error: IP Routing support must be enabled first.

switch(config)# qinq mixed vlan
Warning: This command will reboot the device. Any prior configuration
on this config file will be erased and the device will boot up with a
default configuration
for the new qinq mode.
Do you want to continue [y/n]? n

switch(config)# snmp-server mib hpSwitchAuthMIB included
Information: For security reasons, network administrators are
encouraged to disable SNMPv2 before using the MIB.

To determine if message labeling is enabled, enter the show session command.

Figure 32: The label cli-return-message command enabled
switch(config)# show session
show message type   : Enabled
cli interactive mode: Enabled