Home > Software engineering >  -logfile command doesn't work in Doors and dxl from Jenkins
-logfile command doesn't work in Doors and dxl from Jenkins

Time:08-10

I execute a batch command from Jenkins that opens doors and run a dxl file. I want to get the logs from the run. I read Doors documentation and found -logfile command that supposed to do that, but from some reason it doesn't work and don't create anything in this path: "E:\Jenkins\workspace"

What am I doing wrong?

This is the code inside the batch file:

@echo off
set doors_dir="C:\Program Files\IBM\Rational\DOORS\9.6\bin"
set user="****"
set pswr="****"

if %pswr%=="" got error
if %user%=="" got error

echo Launching Doors... please wait...
::echo USer: %user% PSWD: %pswr%

%doors_dir%\doors.exe -user %user% -password %pswr% -W -batch 
"E:\Jenkins\workspace\faults_exporter.dxl" -logfile "E:\Jenkins\workspace"
goto end
:error
echo invalid User name and/or Password
:end

CodePudding user response:

Try (no guarantees)

@echo off
set "doors_dir=C:\Program Files\IBM\Rational\DOORS\9.6\bin"
set "user=****"
set "pswr=****"

if "%pswr%"=="" gotO error
if "%user%"=="" gotO error

echo Launching Doors... please wait...
::echo USer: %user% PSWD: %pswr%

"%doors_dir%\doors.exe" -user %user% -password %pswr% -W -batch 
"E:\Jenkins\workspace\faults_exporter.dxl" -logfile "E:\Jenkins\workspace"
goto end
:error
echo invalid User name and/or Password
:end

Use set "var=value" for setting string values - this avoids problems caused by trailing spaces. Don't assign a terminal \, Space or " - build pathnames from the elements - counterintuitively, it is likely to make the process easier. If the syntax set var="value" is used, then the quotes become part of the value assigned. It's possible that doors.exe is objecting to the quotes.

CodePudding user response:

see https://www.ibm.com/docs/en/ermd/9.7.2?topic=client-command-line-switches-doors-interoperation-server and https://www.ibm.com/docs/en/ermd/9.7.2?topic=files-application-message-logs

-logfile is only valid for the DOORS Interoperation Server and the DB server. You can influence logging by configuring <DOORS_install_dir>\logging-config-client.xml. But I'm not sure how much information you will get from these logs.

Typically you will want to catch the output of the DXL file - this is printed on STDOUT when you start DOORS in batch mode. Note that "print" does not print on STDOUT, but cout << "good morning" will be caught when you start DOORS like …\doors.exe -batch … > c:\temp\DOORSOutput.txt"

  • Related