It's all about the answers!

Ask a question

Failed Step Logs


Ankit Kothari (1361616) | asked Jul 12 '11, 10:28 a.m.
Hi,

I am trying to create a report which contains information about why the build/deploy failed.
I want to put the error logs of only those steps that failed. As of now, I am using $FULLNORMALLOG, but it contains the log of all the steps in the project. This makes the report very big.

I do not have any log filters associated and hence I cannot use the environment variable associated with the log filter. Also, there is an option to print last few lines of each step. This again is not desirable.

It would be great if anyone can provide some ways to deal with this (Only Failed Step Logs).

Thanks
Ankit

3 answers



permanent link
Brent Ulbricht (2.5k11) | answered Jul 12 '11, 5:14 p.m.
JAZZ DEVELOPER
Hi,

I am trying to create a report which contains information about why the build/deploy failed.
I want to put the error logs of only those steps that failed. As of now, I am using $FULLNORMALLOG, but it contains the log of all the steps in the project. This makes the report very big.

I do not have any log filters associated and hence I cannot use the environment variable associated with the log filter. Also, there is an option to print last few lines of each step. This again is not desirable.

It would be great if anyone can provide some ways to deal with this (Only Failed Step Logs).

Thanks
Ankit


Hi,

With the details about your project, the only thing I can think of is to use the _LOG environment variable which will put the log statements in a file on the agent drive. Then, in your steps you would have to set a fail chain that would look for the file referenced by the _LOG variable. The contents of the file could then be either .set via backtick into an environment variable or pushed into a register. The environment variable or register could then be referenced in a mail template. However, the _LOG will append to the file if it already exists so that is a problem. Maybe, someone else has some ideas.

Brent Ulbricht
RTC Build Lead

permanent link
Chad Rodrigue (76) | answered Jul 13 '11, 11:02 a.m.
JAZZ DEVELOPER
I do not have any log filters associated and hence I cannot use the environment variable associated with the log filter.


Is there a reason why you cannot create a filter for this? Filters seem ideal for what you want to do.

permanent link
Ankit Kothari (1361616) | answered Jul 13 '11, 4:32 p.m.
I do not have any log filters associated and hence I cannot use the environment variable associated with the log filter.


Is there a reason why you cannot create a filter for this? Filters seem ideal for what you want to do.

Hi,

There are many steps in the project and adding log filters to each and every steps is a big problem.
For some of the steps, I call Libraries using .runwait. I have not identified any patterns so far that can be used to write log filters. Also, for most of steps, I continue with the project execution even if the step fails. I do not know how can I use filters in that case.

Also, if I use _Log and specify the file name, it always appends the logs of each steps one after the other. That will include the logs of the steps that passed too. But, I need logs of only those steps which failed.

I am trying build more that 10 different products using one Build Forge Project and so is the problem. I do not have enough idea or better approach to write a project which is trying to build and deploy multiple products. I have libraries for each products which I call using .runwait command.

Thanks
Ankit

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.