Trace logging to multiple files

By default, trace logs grow without limit. This requires the directories and file systems that contain trace log files be checked on a periodic basis to ensure that enough space is available, and to prune the log files or make more space available as necessary.

The routing files can be modified to limit the amount of disk space used for trace logs.

To send runtime trace output, from reporting levels 1 through 5, to 10 different files, each containing a maximum of 10000 trace entries, the routing specification that is shown in Figure 1 can be used in the /opt/PolicyDirector/etc/routing file.

Figure 1. Sending trace output to multiple files

    *:*.5:UTF8FILE.10.10000:/tmp/trace__am_utf8.log:666:ivmgr:ivmgr

Tracing starts with the first file, /tmp/trace__am_utf8.log.1. After 10000 trace entries are logged to that file, trace entries are written to the second file, /tmp/trace__am_utf8.log.2. Tracing continues in this manner until 10000 trace entries are written to the /tmp/trace__am_utf8.log.10 file. At that point, the trace entries in the first file are deleted, and tracing resumes again to the /tmp/trace__am_utf8.log.1 file.

Parent topic: Tracing configuration file examples