Logroller Configuration

last updated on Dec. 23, 2019

The Access Anywhere uses a utility called logroller to rotate many of the logs that it produces. Because each web server node in a Access Anywhere installation produces its own logs and writes them locally, logroller should run on every node. A cron job running in the account of the Linux user smestorage runs logroller once each day.

These notes explain how logroller is configured. That information is provided primarily for reference; it is seldom necessary for Access Anywhere administrators to change logroller's configuration.

An XML configuration file controls which files logroller manages. The configuration file is:

/var/www/smestorage/cron/config_logroller.conf

Logroller's configuration file contains a set of three line stanzas, each of which identifies a file to be managed by logroller. Here is an example:

<file cron/log.txt>
filename=cronlogs.txt
</file>

(Note: In the file the second line of each stanza may be tabbed in to improve readability. As this is XML the whitespace doesn't matter. In fact, each stanza can be written on one line.)

The path within the file tag's brackets on the first line identifies the file to be rotated, with an implicit starting point of /var/www/smestorage/. So in our example, the file to be rotated is:

/var/www/smestorage/cron/log.txt

The value assigned to filename on the second line is the name that the file when be given when it has been rotated out of its original location and into an archive directory. Logroller allows files to be renamed to prevent overwrites if two or more programs produce log files with the same name. In our example log.txt will be renamed to cronlogs.txt when it is moved to the archive area by logroller.