This project is read-only.
The log file definition is relatively simple. Here is the example with the explanation:
<?xml version="1.0" encoding="utf-8"?>
<LogLineDefinition xmlns:xsi="" xmlns:xsd="">
  <Name>DirectX installation log</Name>
  <RegularExpressionString>^(.{17}): (.{7}): (.*)$</RegularExpressionString>
      <StyleDefition HideLine="false" BackColorName="LightYellow" FontStyle="Regular" />
      <StyleDefition HideLine="false" BackColorName="LightGreen" FontStyle="Regular" />

The given example does the following:
  • it expects a log line which can be separated into 3 parts/columns
    • Time
    • Type
    • Message
  • for each log of the line where there is a word Instaling
    • Applies back color LightYellow
  • for each log of the line where there is a word Installed
    • Applies back color LightGreen
  • every line that can not be recognized as a log line is added as a new row and the last column will hold the entire content of the line

Full description:
<LogLineDefinition> - root element
<Name> - name of the log definition, same text will be used as caption of the toolbar button representing the definition
<Columns> - collection of one or more ColumnDefinition elements
<ColumnDefinition> - represents one column definition
<Caption> - column caption
<Size> - size of the column (in pixels)

<RegularExpressionString> - each log line will be matched with the given regular expression, reg. expression must contain the same number of grouping elements '()' as the number of columns in the Columns section
<Styles> - collection of one or more styles that will be applied to the row
<StyleExpression> - one style expression
<RegularExpressionString> - style will be applied if the regular expression can be matched to the log line
<NegateRegularExpression> - if set to true then the regular expression matching is inverted, this is so you do not need to write complex regular expressions
<StyleDefition> - style that will be used
StyleDefition.HideLine - if set to true then the line will be hidden when the match is made
StyleDefition.BackColorName - background color, you may use .NET Color names
StyleDefition.FontStyle - font style, you may use .NET FontStyle enumeration members (Bold, Italic, Underline, Regular)
<NonMatchedLogLineStrategy> - strategy to use if the log line can not be matched to <RegularExpressionString> expression

Valid <NonMatchedLogLineStrategy> strategies are:
  • Ignore - line will be skipped
  • AppendToPrevious - line is appended to the previous line last column
  • AddAsNewLine - line added as a new row where all the contents are in the last column

Last edited Aug 10, 2011 at 5:01 PM by dcarapic, version 4


No comments yet.