Jump to content
  • BW6.X - How to have separate log files per application in BusinessWorks


    In BusinessWorks 6.X it is possible to deploy multiple applications in an appspace and then to have at run time multiple applications running in the same appnode.

    In the default configuration all the running applications log messages are going to the appnode log file ‘bwappnode.log’ located in the target appnode log directory (<TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>/log).

    In order to ease application trouble shooting it is possible in recent BusinessWorks releases, precisely since BusinessWorks 6.6.0, to have a separate log file for each application.

    This article is to explain how to set-up such configuration and the limitations to be considered.

    How to configure an appnode to have separate log files per application

    This can be done with the following:

    . Go to the target appnode directory <TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>

    . Edit the config.ini file to add the following property:
    bw.engine.separate.logs.by.app=true

    1*ZJ5K0whcrOVVb6BGFMNb_w.png

    . Edit the logback.xml file to add the following tag in the root logger definition:
    <appender-ref ref=”APPLICATION-FILE”/>

    1*-qH2iULhvcjsJYgFiGhYYw.png

    . Restart the appnode

    With this configuration application logfiles are written next to the bwappnode.log file in the target appnode log directory. The application log file names are in the form <application_name>.application.log.

    1*vl4dzgFe0jS-gsOrtibf1g.png

    It is possible to add some loggers configured with the DEBUG level in the configuration above by including the following tag in their definition:

    <appender-ref ref=”APPLICATION-FILE”/>

    For example it is possible to add the DEBUG trace of the REST/JSON palette in the application log file using the following logger definition:

    1*xFhKz0NG4YeH_j4FFTqQeg.png

    It is also possible to control log messages destination at logger level, you can refer to the BusinessWorks documentation for more details.

    Limitations to be considered

    . Application start and stop messages (Starting, Started, Stopping, Stopped,...) remain in the appnode log file

    . Third party loggers, like for example the apache and jetty loggers, do not support logging in separate application log files. The related log messages remain in the appnode log file

    . When multiple versions of the same application are deployed in the same appspace the logs of the different versions of the application are going to the same file

    Since BusinessWorks 6.10 it is possible to have the full application version (major.minor.patch) included in the log by adding the following property in the appnode config.ini file:
    bw.frwk.version.format=true

    Reference elements

    BusinessWorks documentation:

    https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm#administration/application-logging.htm

    Article explaining how to configure logging at activity level:

    https://community.tibco.com/articles/tibco-activematrix-businessworks/bw6x-bwce-how-to-enable-activity-level-logging-in-businessworks-6x-and-businessworks-container-edition-r3383/


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