Jump to content
We've recently updated our Privacy Statement, available here ×
  • Enable Logging for Custom Classes on TIBCO JasperReports® Server.


    Tirupathi Mangalarapu
    • Features: Logging Version: v7, v7.3, v7.3.0, v7.2, v7.2.2, v7.2.1, v7.2.0, v7.1, v7.1.1, v7.1.0 Product: JasperReports® Server

    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.

    1.png.eeba9779268e9da8e92b0a0c8d7c0269.png

    2.png.03da5354b51dfc09bc3d720a0282f731.png

    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:

    3.png.9ef7868c898f29ded51cc9d01178750a.png

    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).

    4.png.2d2ad28a30910ea6d7033a5404e70a51.png

    An entry will be created into the log settings as shown below:

    5.png.edfe0a63584c0cb7950576a518fa557b.png

    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:

    6.png.7f1aa9bd298b26aa1869d7b7e713345f.png


    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:

    7.png.6b016921e05754e0a1eb22ac6b11672d.png

    1.png.11963e3a29001e0ea957178426aa29a7.png

    3.png.16bc5fd2ff0808d2dbf2d14cbb9559cd.png

    5.png.57f1c9ef8b43aeb3aabd37374192146a.png

    6.png.bfce850c164806057214152e5f404ee0.png

    7.png.a88f4c588447b0db2a477bde981b0938.png


    User Feedback

    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...