IBM Support

How to capture output of Build Forge 7.1.x engine running in the foreground on Windows

Question & Answer


Question

How do you capture all output messages of IBM Rational Build Forge 7.1.x engine running in the foreground on Microsoft Windows platform for troubleshooting purposes?

Answer

You can redirect all output messages of Build Forge 7.1.x engine running in the foreground to a file by creating a script file which can work like 'tee' command. Here are steps:

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.




  1. Create a script file

    Create a script file which reads input from STDIN and writes it to STDOUT and STDERR both. Here is a sample script file (*.vbs) which can be run by CScript.exe. In this example, it is saved as C:\temp\redirect.vbs.


    Dim str
    Set stdin = WScript.StdIn
    Set stdout = WScript.StdOut
    Set stderr = WScript.StdErr

    Do While Not stdin.AtEndOfStream
        str = stdin.ReadLine
        stdout.WriteLine str
        stderr.WriteLine str
    Loop


  2. Start Build Forge engine with the script

    Start Build Forge engine with the script. The following syntax can be used for the sample script above:


    cd <Build Forge engine install directory>
    bfengine.exe -d 2>&1 | cscript C:\temp\redirect.vbs 2>C:\temp\bfengine_log.txt


Now you can redirect all output messages to a file (C:\temp\bfengine_log.txt in this example) as well as see them in the foreground Window.

Important Note: CScript.exe is a command-line version of the Windows Script Host, which is provided by Microsoft. For more details, refer to http://technet.microsoft.com/en-us/library/bb490887.aspx.

[{"Product":{"code":"SSB2MV","label":"Rational Build Forge"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Engine","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.1;7.1.1;7.1.1.1;7.1.1.2;7.1.1.3;7.1.1.4","Edition":"Enterprise;Standard;Express","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21441280