debug logfile

To direct the output of the debug commands to a specified file, use the debug logfile command. To revert to the default, use the no form of this command.

debug logfile filename [ size bytes ]

no debug logfile filename [ size bytes ]

Syntax Description

filename
Name of the file for debug command output. The filename is alphanumeric, case sensitive, and has a maximum of 64 characters.
size bytes
(Optional) Specifies the size of the log file in bytes. The range is from 4096 to 4194304.

Command Default

None

Command Modes

EXEC mode

Command History

Release
Modification
4.0(0)N1(1a)
This command was introduced.

Usage Guidelines

The Cisco NX-OS software creates the logfile in the log: file system root directory. Use the dir log: command to display the log files.

Examples

This example shows how to specify a debug log file:

switch# debug logfile debug_log
 

This example shows how to revert to the default debug log file:

switch# no debug logfile debug_log
 

Related Commands

Command
Description
dir
Displays the contents of a directory.
show debug logfile
Displays the debug logfile contents.