[Contents] [Prev] [Next] [Index] [Report an Error]


Configure Archiving of Log Files

By default, the JUNOS logging facility stops writing messages to a log file when the file reaches 128 KB in size. It closes the file and adds a numerical suffix, then opens and directs messages to a new file with the original name. By default, it creates up to 10 files before it begins overwriting the contents of the oldest file. The logging utility by default also limits the users who can read log files to the root user and users who have the JUNOS maintenance permission.

To configure different values that apply to all log files, include the archive statement at the [edit system syslog] hierarchy level:

[edit system syslog]
archive {
    files number ;
    size size ; 
    (world-readable | no-world-readable); 
}

To configure different values that apply to a particular log file, include the archive statement at the [edit system syslog file filename ] hierarchy level:

[edit system syslog] 
file filename {
    facility level ;
    archive {
        files number ;
        size size ; 
        (world-readable | no-world-readable); 
    }
}

To specify the number of files to create, set the files statement to a value from 1 through 1000.

To specify the maximum size of each file, set the size statement to a value from 64 KB (64k) through 1 GB (1g).

To enable all users to read log files, include the world-readable statement. To restore the default permissions, include the no-world-readable statement.


[Contents] [Prev] [Next] [Index] [Report an Error]