Configure CLI Logging

About this task

Use CLI logging to track all CLI commands executed and for fault management purposes. The CLI commands are logged to the system log file as CLILOG module.

Note

Note

The platform logs CLILOG and SNMPLOG as INFO. Normally, if you configure the logging level to WARNING, the system skips all INFO messages. However, if you enable CLILOG and SNMPLOG the system logs CLI Log and SNMP Log information regardless of the logging level you set. This is not the case for other INFO messages.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Enable CLI logging:

    clilog enable

  3. Disable CLI logging:

    no clilog enable

  4. Ensure that the configuration is correct:

    show clilog

  5. View the CLI log:

    show logging file module clilog

  6. View the CLI log.

Example

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#clilog enable

Variable Definitions

The following table defines parameters for the clilog commands.

Variable

Value

enable

Activates CLI logging. To disable, use the no clilog enable command.