r21 - 2015-05-27 - 16:36:41 - StephanieBagotYou are here: TWiki >  Deployment Web > DeploymentTroubleshooting > IntegrationsTroubleshooting > IntegrationsTroubleshootingRTCandBuildforge > HowToEnableVerboseLoggingForJBEAndAntTasksToGetMoreDebugInformationInConsoleAndLogs

How do I enable verbose logging for Jazz Ant tasks, Jazz Build Engine, and Rational Build Forge integration with Rational Team Concert?

Authors: IntegrationsTroubleshootingTeam
Build basis: Rational Team Concert 4.0.x, 5.x

This page provides information to help you enable verbose logging for your Jazz Build Engine and Ant tasks in order to increase the amount of debug information reported in the build logs that are generated by Rational Team Concert.

Initial assessment

  • In order to debug a certain Jazz Ant task or Jazz Build Engine participant that is failing, you have the option to enable the verbose output. This option will get more details about the task or participant actions.

Data gathering and subsequent analysis steps

Jazz Ant tasks tracing

To better understand why a Jazz Ant task fails or does not work as expected, you can enable verbose logging for the Jazz Ant task.

Example:

 <completeBuildActivity activityId="${compileActivityId}"
                                                     buildResultUUID="${buildResultUUID}"
                                                      repositoryAddress="${repositoryAddress}"
                                                    userId="${userid}"
                                                       password="${password}"
                                                    verbose="true"/>

The verbose output is captured in the build log files (step logs of Build Forge) that will be available in the build results overview in Rational Team Concert Eclipse client or web UI.

To add debug output to the build, add echo statements into the Ant build script to validate build variables.

Example:

 <echo message="Checking variable value for activityId: ${compileActivityId}" />
 <echo message="Checking variable value for repositoryAddress: ${repositoryAddress}" />

Jazz Build Engine participant tracing

Add -verbose argument to the command where you invoke the participant.

${Build_Engine_Path}/jbe -userId ${Build_User} -pass ${Build_Password} -repository ${Repository_Address} -buildResultUUID ${buildResultUuid} -engineUUID ${engineUUID} -participants com.ibm.team.build.autoDeliver -noComplete -verbose

This will capture the verbose output of the participant in the Rational Team Concert build log files that will be available in build results overview in Rational Team Concert Eclipse client or web UI.

Jazz Build Engine tracing

Add -verbose argument to the Jazz Build Engine (jbe) run command.

/jbe -userId ${Build_User} -pass ${Build_Password} -repository ${Repository_Address}  -engineId engine -verbose

This will start including the verbose output in the console that is running the Jazz Build Engine binary.

Rational Build Forge integration tracing

To enable the verbose trace of the Build Forge integration with Rational Team Concert and to get details in the logs about what is happening in the background when you request a build from Rational Team Concert, enable verbose logging for the following properties:

1. In the log4j.properties file of the Change and Configuration Management (CCM) or Jazz application, enable verbose logging for the following properties and restart the server:

log4j.logger.com.ibm.rational.buildforge=DEBUG
log4j.logger.com.ibm.rational.connector.buildforge=ALL

Or to reduce the noise and debug a particular task.

log4j.logger.com.ibm.rational.buildforge.team.internal.service.BuildForgeBuildLoopScheduledTask=DEBUG
log4j.logger.com.ibm.rational.buildforge.team.internal.service.BuildForgeEventPollerScheduledTask=DEBUG

Instead of restarting the server you can reload the log4j.properties file by accessing the following link:

https://server:9443/ccm/admin?internal=true#action=com.ibm.team.repository.admin.reloadLoggingSettings

(This will avoid having to restart the server)

Now you can request the build from the Rational Team Concert build definition and all the tracing will be captured in the ccm.log or jazz.log file.

List all the Build engines defined in the repository

use the following URL to get a list of all Build engines defined in the repository. Make sure Jazz Admin account is used.

https://HOST:PORT/ccm/resource/virtual/build/engines?_prettyPrint=true

Please note from this output , you can also check the engine state and which build definition it supports.

List all the Build definition defined in the repository.

Again, use Jazz admin account and use the URL below:

https://HOST:PORT/ccm/resource/virtual/build/definitions?_prettyPrint=true

Related topics:

External links:

  • None

Additional contributors: ZeeshanChoudhry

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r21 < r20 < r19 < r18 < r17 | More topic actions
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use. Please read the following disclaimer.
Ideas, requests, problems regarding the Deployment wiki? Create a new task in the RTC Deployment wiki project