Why
This article is for someone who has developed some custom code or classes and you deployed them to TIBCO JasperReports® Server and they like to get detail logging information when troubleshooting those custom modules.
History
You can set log settings to any of the following log levels: INFO, ERROR, WARNING, and DEBUG for all the out of the box classes listed under server settings. But if you've added custom codeclasses then you would need to manually configure the class name in the log settings on the JasperReports® Server to enable detail logging (INFO, ERROR, WARNING, and DEBUG).
How
Here is an example scenario: I used the OAuth custom authentication provider for which I built the jar file and dropped the jar file(along with dependencies and the configuration file) into the WEB-INF/lib directory and building the custom authentication provider is beyond the scope of this KBA.
Now to enable logging for custom classes, log in to JasperReports Server with user credentials that have access to Server Settings (/jasperserver-pro/log_settings.html)
As shown below:
At the bottom of the right of the page, you see a free text field where you can enter the class name into the free text input field. So you need to get the class name of the custom class, which in this case is:
package.calssname: “com.jaspersoft.jasperserver.ps.OAuth. OAuthPreAuthenticationFilter”
Add this value into the free text field and choose "DEBUG"(you can select any of the log levels: ERROR, WARN, INFO or DEBUG).
An entry will be created into the log settings as shown below:
Now, when we the server hits the module, then we can see debug entries in the Jaspersoft log file as shown below in the screenshot:
Note: Please ensure that you disable debug logging after troubleshooting so that it will not add more overhead to the server performance.
Go to Restore Defaults section, select the class, and click on delete:
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now