Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Directing System Log Messages to a Log File

To direct system log messages to a file in the /var/log directory of the local Routing Engine, include the file statement at the [edit system syslog] hierarchy level:

[edit system syslog]
file filename {facility severity;archive <archive-sites (ftp-url <password password>)> <files number> <size size> <start-time "YYYY-MM-DD.hh:mm"> <transfer-interval minutes> <world-readable | no-world-readable>;explicit-priority;match "regular-expression";structured-data {brief;}}

For the list of facilities and severity levels, see Specifying the Facility and Severity of Messages to Include in the Log.

To prevent log files from growing too large, the Junos OS system logging utility by default writes messages to a sequence of files of a defined size. By including the archive statement, you can configure the number of files, their maximum size, and who can read them, either for all log files or for a certain log file. For more information, see Specifying Log File Size, Number, and Archiving Properties.

For information about the following statements, see the indicated sections:

Published: 2013-01-16