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 |
![js-LogCollectors-view.png.282564f29e04f7792756c3ec0062bc66.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| 4. | Click Create Log Collector. |
Creating a New Log Collector |
![js-LogCollectors-new.png.bd5ec078168b674eb5cab4fa77e8b6e7.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| 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 check box 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 ![js-LogCollectors-icon-stop.png.9d38707dfbdd9bbe7545472ef7676269.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| 4. | After the log collector has stopped, the logs are ready to download in a compressed ZIP file. Click the download icon ![js-LogCollectors-icon-download.png.a5b468ff32a3eb29329e043350fe2de8.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| 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 ![js-LogCollectors-icon-delete.png.beff74232802c98195083021ad993f3b.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Recommended Comments
There are no comments to display.