Technical Documentation

file (System Logging)


file filename {facility severity;archive {files number;size size;(no-world-readable | world-readable);}explicit-priority;match "regular-expression";structured-data {brief;}}

Hierarchy Level

[edit system syslog]

Release Information

Statement introduced before JUNOS Release 7.4.

Statement introduced in JUNOS Release 9.0 for EX Series switches.


Configure the logging of system messages to a file.


facility—Class of messages to log. To specify multiple classes, include multiple facility severity statements. For a list of the facilities, see JUNOS System Logging Facilities and Message Severity Levels.

file filename—File in the /var/log directory in which to log messages from the specified facility. To log messages to more than one file, include more than one file statement.

severity—Severity of the messages that belong to the facility specified by the paired facility name. Messages with severities the specified level and higher are logged. For a list of the severities, see JUNOS System Logging Facilities and Message Severity Levels.

The remaining statements are explained separately.

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Published: 2010-04-26