Customizing build log tree view

Is it possible to affect the treeview of a build log level by adding tabs or special characters into a build log?  I have attempting to add a tab at the beginning of a line in the build log to get the treeview to change its level but this didn't work, I tried the same with a tab and a space (after peeping at the source it seems like you use a tab and a space but I am not sure when you add those to the build log or how you decide where they should be).  It would be helpful to be able to customise the level to make the logs more readable (we have rather long logs!).

Cheers,
Andrew

4 comments
Comment actions Permalink

The indentation works but I get a lot of 'The system cannot find the file specified' warnings.  I entered the following test script to try it out:


     ECHO Testing build blocks
     ##teamcity[blockOpened name='<TestBlock>']
     ECHO This is a test block.
     ECHO Same block
     ##teamcity[blockOpened name='<TestBlock2>']
     ECHO Indented
     ##teamcity[blockClosed name='<TestBlock2>']
     ECHO Unindented
     ##teamcity[blockClosed name='<TestBlock>']
     ECHO Back to the root


This is what the log looks like:

TeamCityBuildBlocks.PNG

Any idea why that might be happening?  The other interesting thing to note is adding a ECHO OFF to the begining of the script stops any of the levels being generated but still produces the warning messages.

Cheers,
Andrew

0
Comment actions Permalink

Andrew,

Your script will work fine if you avoid using "<" and ">" (which are special charatcers in batch files language) in block names and log TeamCity service messages using

ECHO ##teamcity[blockOpened name='TestBlock']

Adding ECHO off will also make your blocks structure more clear.

0
Comment actions Permalink

Thank you, that is working perfectly now :).

Cheers,
Andrew

0

Please sign in to leave a comment.