15.19. listlogfiles

Displays a list of the log files in the catalina.home path. If you need to explicitly set the log file path, you can use the logdir setting in the main.cf configuration file.

You can specify the sorting column(s) by a semicolon-separated list of column numbers in the -s option. Allowed are values 1, 2, and 3 for the first (filename), second (last modified) and third (size) columns, respectively. If you need to sort a given column in descending order, you can enter a - prefix in front of the column's index. Default sorting is by filename (ascending order).

Further, you can use Java regular expressions (https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html) for filtering files.

The example below lists all log files starting with ''reportserver'' and sorting them by size in descending order.

listlogfiles -s -3 -f "reportserver.*"

The example below lists all log files starting with ''reportserver'' and sorting them by size in descending order, followed by filename in ascending order.

listlogfiles -s -3;1 -f "reportserver.*"

Further, you can use the -e option if you want to send the (filtered) log files via e-mail. For example, the following allows you to ZIP and send all log files starting with ''reportserver'' to the current user via e-mail.

listlogfiles -s -3;1 -f "reportserver.*" -e

Note that you can display the last n lines of a given log file with the viewlogfile command described in Section 15.42. viewlogfile.

Use: listlogfiles [-s] [-f]