Styling FinalBuilder HTML Build Logs

FinalBuilder generates a log as it processes each step in your build process. The Export Log action enables you to export the build log to a file. The default format for this file is HTML, which generates a nicely formatted report including expandable sections to view the detail for steps that generated console output during the build process.

I noticed today, however, that the date in the header portion of the HTML log was rendered as 14/12/2006 rather than month/day/year format of 12/14/2006 we are accustomed to in the United States. As it turns out, this is easily changed.

The format and appearance of the HTML output is determined by an XSL stylesheet. The default stylesheet is named ConvertLogToHTML.xsl located in the StyleSheets sub-folder where FinalBuilder is installed. To change the format of the date, simply edit the 'extractdatetime' template element and reverse the order in which the month and day parts of the datetime string are extracted.

The FinalBuilder export log options enable you to specify the default export format (XML, HTML, or Text) as well as the default XSL stylesheets for HTML and Text output. While changing the format of a date is a trivial example, the ability to edit the default stylesheets or even replace them with entirely different ones gives you complete control over the format and appearance of your build logs.

Footnote: The FinalBuilder website today is featuring a 20% discount off FinalBuilder or Automise through December 30th.


No comments: