sbsv2/raptor/notes/parametric_log_filters.txt
author mikek
Fri, 04 Jun 2010 13:09:28 +0100
changeset 18 de5b887c98f7
permissions -rw-r--r--
Upgrading to Raptor 2.14
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     1
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     2
It is now possible to pass parameters from the command line into log filters.
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     3
This works in the same way for both sbs and sbs_filter commands.
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     4
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     5
For example:
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     6
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     7
sbs --filters=Foo[param1,param2,param3]
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     8
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
     9
sbs_filter --filters=Bar[value] < build.log
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    10
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    11
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    12
Multiple filters with parameters can be specified if needed,
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    13
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    14
sbs --filters=Foo[param1,param2,param3],Bar[value]
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    15
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    16
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    17
In the 2.13.0 release there are two filters which take parameters:
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    18
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    19
1. sbs_filter --filters=FilterComp[wizard/group] < log
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    20
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    21
Here the parameter is (part of) a bld.inf path and the filter only prints
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    22
parts of the log which are attributable to the matching component. In the
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    23
example above, the log elements from any bld.inf which has "wizard/group" 
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    24
as part of its path will be printed: normally, passing the full path name
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    25
will guarantee that only one component matches.
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    26
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    27
2. sbs_filter --filters=FilterTagCounter[info,recipe] < log
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    28
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    29
Here the parameters are a list of the element names to count. This is a
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    30
simple analysis filter that shows you how many instances of XMl elements
de5b887c98f7 Upgrading to Raptor 2.14
mikek
parents:
diff changeset
    31
are in a log and how many characters of body text they have.