The default operation of automation script trace files is to log important events in a file called op-script.log for op scripts and event-script.log (for event scripts) located in the /var/log directory. When the file op-script.log or event-script.log reaches 128 kilobytes (KB), it is renamed and saved with a number 0 through 9 in ascending order appended to the end of the file. For example: op-script.log.0, then op-script.log.1, until there are 10 trace files. Then the oldest trace file (op-script.log.9) is overwritten. (For more information about how log files are created, see the JUNOS System Log Messages Reference.)
You cannot change the directory (/var/log) in which trace files are located. However, you can customize the other trace file settings by including the following statements at the [edit system scripts op traceoptions] or [edit event-options event-script traceoptions] hierarchy level:
- [edit system scripts op traceoptions]
- [edit event-options event-script traceoptions]
- file <filename> files number size size;
- flag {
- all;
- events;
- input;
- offline;
- output;
- rpc;
- xslt;
- }
These statements are described in the following sections: