Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • BW6.X - BWCE - How to enable activity level logging in BusinessWorks 6.X and BusinessWorks Container Edition


    This article explain how to enable activity level logging both while debugging applications in Studio and at runtime, and also list a number of useful XML tags to debug BusinessWorks applications.

    Explanations on how to increase the number of lines kept in the Eclipse Console are also provided.

    Enabling activity logging while in debug mode (using Studio)

    This can be done with the following:

    . Navigate to the <TIBCO_HOME>\bw\6.X\config\design\logback directory and open the logback.xml file
    . Go to the User loggers section
    . Add the logging tags you want to use, for example:

    1*HY3LpE2Fmb8OQWaiye3Cuw.jpeg

    . Save the file and restart the Debugger

    Note that the logback.xml file used by Studio in a debug session can be defined using the following approach:

    . Display the Debug Configurations panel using the Run -> Debug Configuration menu
    . In the panel open the ‘Advanced’ tab
    . The target logback.xml file is defined in the ‘Logging configuration’ field:

    1*-Op2ytcl9LE9gs4BKK-0fA.png

    Note that a logback_leveldebug.xml file is provided, using this file all BusinessWorks activities and resources are running with log level set to DEBUG.

    Enabling activity logging in runtime mode

    This can be done with the following:

    . Navigate to the <TIBCO_HOME>\bw\6.X\domains\<YOUR_DOMAIN_NAME>\appnodes\<YOUR_APPSPACE_NAME>\<YOUR_APPNODE_NAME> directory and open the logback.xml file

    . Go to the User loggers section

    . Add the logging tags you want to use, for example:

    1*TKW8z0b1Rkyzy4mqwPEQSQ.jpeg

    . Save the file
    . The change will be taken into account in the next minute by the appnode (there is no need to restart the appnode)

    Useful XML tags to debug BusinessWorks applications

    # HTTP Logging

    <logger name=”org.apache.http”>
    <level value=”DEBUG”/>
    </logger>
    <logger name=”org.eclipse.jetty”>
    <level value=”DEBUG”/>
    </logger>
    <logger name=”org.glassfish.jersey”>
    <level value=”DEBUG”/>
    </logger>

    # REST Binding Logging

    Note : this tag is already present in the default logback.xml file, you just need to update the level

    <logger name=”com.tibco.bw.binding.rest.runtime”>
    <level value=”DEBUG”/>
    </logger>

    # SOAP Binding Logging

    Note : this tag is already present in the default logback.xml file, you just need to update the level

    <logger name=”com.tibco.bw.binding.soap”>
    <level value=”DEBUG”/>
    </logger>

    # JDBC Palette activities logging

    <logger name=”com.tibco.bw.sharedresource.jdbc”>
    <level value=”DEBUG”/>
    </logger>

    <logger name=”com.tibco.bw.palette.jdbc”>
    <level value=”DEBUG”/>
    </logger>
    <logger name=”com.tibco.bw.palette.jdbc.runtime.callprocedure”>
    <level value=”DEBUG”/>
    </logger>

    # JMS Palette activities Logging

    <logger name=”com.tibco.bw.sharedresource.jms”>
    <level value=” DEBUG “/>
    </logger>
    <logger name=”com.tibco.bw.palette.jms”>
    <level value=” DEBUG “/>
    </logger>

    # File Palette activities Logging

    <logger name=”com.tibco.bw.palette.file”>
    <level value=”DEBUG”/>
    </logger>

    # REST JSON Palette activities logging

    <logger name=”com.tibco.bw.palette.restjson”>
    <level value=”DEBUG”/>
    </logger>

    # Mail Palette activities logging

    <logger name=”com.tibco.bw.palette.mail”>
    <level value=”DEBUG”/>
    </logger>

    #Active Database Plugin
    <logger name=”com.tibco.bw.palette.adbplugin.runtime”>
    <level value=”DEBUG”/>
    </logger>

    #MQSeries Plugin

    <logger name=”com.tibco.bw.palette.bwmq.runtime”>
    <level value=”DEBUG”/>
    </logger>

    # Kafka Plugin
    <logger name=”com.tibco.bw.palette.kafka.runtime”>
    <level value=”DEBUG”/>
    </logger>

    # Oauth Shared Resource
    To trace the Oauth shared resource behaviour in stdout you can use the following configuration:

    <logger name=”com.tibco.bw.sharedresource.oauth”>
    <level value=”TRACE”/>
    <appender-ref ref=”STDOUT”/>
    </logger>

    How to increase the size of the Eclipse Console

    . Use the Window -> Preferences menu to display the Preferences panel

    . Then go the Run/Debug -> Console section

    . Increase the value of the Console Buffer Size:

    1*hL8Lqo7J0mS5cgpABmn8zQ.png
     

    . Click Apply and OK

    How to write the Studio Console log in a file while using the Debugger

    . Open the logback.xml file under the <TIBCO_HOME>\bw\6.6\config\design\logback folder.

    . Add the ‘FILE’ appender in the top APPENDER section, which writes to file:

    <appender name=”FILE” class=”ch.qos.logback.core.FileAppender”>
    <file>c:/temp/studio.log</file>
    <encoder>
    <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} — %msg%n</pattern>
    </encoder>
    </appender>

    1*DmC1dC5n6BRcBxdtIGq33A.png
     

    . Goto the bottom of the file and add a reference to the FILE appender created in the previous step:
    <appender-ref ref=”FILE” />

    It should look like below :

    1*y0LwgVI2JEICQsIEe3CvCQ.png

    . While running the Studio debugger check the file “c:/temp/studio.log” for the Console output.

    How to redirect the BusinessWorks log to stdout at runtime

    . Open the logback.xml file under the <TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME> folder.

    . Add the ‘STDOUT’ appender in the top APPENDER section

    <appender name=”STDOUT” class=”ch.qos.logback.core.ConsoleAppender”>
    <encoder>
    <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{36} — %msg%n</pattern>
    </encoder>
    </appender>

    1*_6atKwa3nRLblC_MusMvQw.png

    . Goto the bottom of the file and add a reference to the STDOUT appender created in the previous step:
    <appender-ref ref=”STDOUT” />

    It should look like below :

    1*l_ubBoyX3TMr_4fzDFjpyg.png

    . At runtime messages written in the BusinessWorks log should now appear in the appnode stdout log

    How to redirect the BusinessWorks stdout to a file in the Debugger

    . Select the ‘Run -> Debug Configuration’ menu
    . In the ‘Debug Configuration’ panel select the ‘Common’ tab
    . Enable the ‘Output File’ option and select a target file

    1*u3d081TZx6AmWjxu7pwj3g.png

    How to redirect an appnode stdout to a file at runtime

    In a Linux environment you can do the following:

    . Go the appnode ‘bin’ directory
    <TIBCO_HOME>/bw/6.8/domains/<YOUR_DOMAIN>/appnodes/<YOUR_APPSPACE>/<YOUR_APPNODE>/bin

    . Start the appnode with the following command:
    nohup ./startBWAppNode.sh > app.out 2>&1 &

    How to see the full application version in the log

    When deploying multiple versions of the same application in the same appspace it is useful to have the full application version (major.minor.patch) included in the log.

    Since BusinessWorks 6.10 it is possible to do so by adding the following property in the appnode config.ini file:
    bw.frwk.version.format=true


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