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