Using Log Collectors

Logs are useful for finding problems when the server is not behaving as expected. However, log files can be huge and it is difficult to find the log messages associated with the issue you noticed. In addition, viewing a log files require access to the server's file system.

Log collectors are a new feature introduced in JasperReports Server version 6.1. Log collectors simplify the diagnosis of server errors by recording logs from a specific user or report for a specific duration, and make this excerpt of the log files available through the server's UI for administrators.

To create and start a log collector:

1. Log in as system administrator (superuser in commercial editions, jasperadmin in community editions).
2. Set your logging levels and your loggers for the classes you wish to capture, as described in Configuring System Logs.
3. Select Manage > Server Settings and choose Log Collectors in the left-panel.

The page displays any current log collectors, either running or stopped and ready to be downloaded.

Viewing Log Collectors

4. Click Create Log Collector.

Creating a New Log Collector

5. On the New Log Collector page, enter a name for the collector, and then the following optional information
     A user ID, in the format username|organizationID for commercial editions. When a user ID is specified, only logs related to that user are collected. When empty, logs for all user are included.
     The resource URI of a JasperReport or an Ad Hoc view. You can use the Browse button to select the report or Ad Hoc view in the repository. When specified, only the logs for that report or view will be collected. When empty, all logs are included.
     If you specified a report or view, and you have data snapshots enabled, you can select the checkbox to include the data from the snapshot in your log file.
     Set a verbosity level of low, medium or high. Low is the default.
6. Click Save to save your log collector and begin collecting the specified logs.
7. Perform the actions on the server for which you want to collect logs. If you specified a user ID, the user should log in or an administrator can log in as the user from the Manage > Users page. If you specified a report or view, run it and interact with it to collect logs about it.

To stop a log collector and view its contents:

1. Log in as system administrator (superuser in commercial editions, jasperadmin in community editions).
2. Select Manage > Server Settings and choose Log Collectors in the left-panel.
3. On the Log Collectors page, locate your log collector and click the stop icon . The status for the collector shows "Stopping..."
4. After the log collector has stopped, the logs are ready to download in a compressed ZIP file. Click the download icon to save the collected logs on your computer.
5. After downloading the logs, the log collector can be kept in case you want to download the files again. When you no longer need the log collector, click the delete icon . If you want to run a collector again, you must delete it first and create it again.
Version: 
Feedback