The Log File
Each build produces a log file. By default, the log file is called LastBuild.log
and can be found in the output folder. You can modify the Build Log Filename project
property to rename it and/or store it in a different location. The log will always be present unless the
project's Keep Log File property is set to false and the build succeeds. The log file
content is in an XML format. This allows you to run it through an XSL transformation to make it more readable,
highlight warnings and errors, etc. A default transformation is supplied and can be found under the main help
file builder installation folder (.\Templates\TransformBuildLog.xsl).
The build log viewer tool window loads the build log file and formats it in a more readable format
with each build step and plug-in section separated with a visible header. The build step sections are
collapsible. A set of radio buttons at the top of the tool window change the build step details as follows:
Plain - This is the default option and loads the fastest. It simply
displays the build step output as plain text.
Highlight warnings and errors - This option will highlight all warning
and error messages in the build log content. This lets you see warning and error messages with surrounding
context which might help you identify the cause or location of the failure.
Show only warnings and errors - This option filters all build step and
plug-in output text so that only warning and error messages are shown. This greatly reduces the amount of
information that you must look through to see the warnings and errors.
The highlight and filter options will load much more slowly than the plain text option as it has
to examine each line of the build step output looking for warning and error marker text. It can take about ten
to twenty seconds per megabyte based on the log file size.
The formatted log is in HTML and the viewer uses the web browser control to display it. As such,
you can use Ctrl+F to search the log and access the context menu to print the log content.
The log file content consists of the following XML elements:
Element | Description |
---|
shfbBuild | This is the root element that contains all of the build step output. It has four attributes: The product attribute identifies the tool that produced the log (the
help file builder). The version attribute identifies the build engine version. The projectFile attribute identifies the project file that was built. The started attribute contains the date and time that the build was
started.
|
buildStep | This element contains the output for an individual build step. The build step is identified in the
step attribute and corresponds to an enumeration value from
SandcastleBuilder.Utils.BuildEngineBuildStep. |
plugIn | This element contains the output from a plug-in that runs inside of a build step. This element will
always be nested within a buildStep element and there may be more than one depending on
how many plug-ins ran during the given step. This element has three attributes: The name attribute identifies the plug-in that ran. The behavior attribute specifies the execution behavior of the
plug-in. The priority attribute specifies the execution priority of the
plug-in.
|