trace-util-adv 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/DOCUMENTATION +9 -1
- data/VERSION +1 -1
- data/lib/filters/tracing_filter.rb +8 -0
- data/lib/sample_filters.rb +2 -0
- data/trace-util-adv.gemspec +2 -2
- metadata +2 -2
data/DOCUMENTATION
CHANGED
@@ -71,7 +71,15 @@ Design
|
|
71
71
|
|
72
72
|
- MsgContextFilter
|
73
73
|
- can be used to decide whether the trace message and current context should "pass through".
|
74
|
-
- Multiple filters can be chained.
|
74
|
+
- Multiple filters can be chained.
|
75
|
+
A single filter can have any of these results:
|
76
|
+
|
77
|
+
:include - include and end filter chain (pass through all filters no matter what the following filters decide)
|
78
|
+
:exclude - exclude and end filter chain (filter blocks no matter what the following filters decide)
|
79
|
+
:yield - no decision, let following filters decide
|
80
|
+
:include_and_yield - include for now, but let following filters overrule this
|
81
|
+
:exclude_and_yield - exclude for now, but let following filters overrule this
|
82
|
+
|
75
83
|
Chaining filter behavior:
|
76
84
|
if any filter returns :include, the result of all filters will be :include
|
77
85
|
if any filter returns :exclude, the result of all filters will be :exclude
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -63,6 +63,14 @@ module Tracing
|
|
63
63
|
res = _filter.allow_action(msg, context)
|
64
64
|
# puts "res: #{res}"
|
65
65
|
|
66
|
+
if (res == :include_and_yield)
|
67
|
+
allow = true
|
68
|
+
end
|
69
|
+
|
70
|
+
if (res == :exclude_and_yield)
|
71
|
+
allow = false
|
72
|
+
end
|
73
|
+
|
66
74
|
if (res == :include)
|
67
75
|
# puts "included - break"
|
68
76
|
allow = true
|
data/lib/sample_filters.rb
CHANGED
@@ -28,6 +28,7 @@ Class_filter_A = {
|
|
28
28
|
:name => 'my_classes',
|
29
29
|
:include => [/MyCl/],
|
30
30
|
:exclude => [/NotMy/],
|
31
|
+
:include_and_yield => ['blap'],
|
31
32
|
:default => false
|
32
33
|
}]
|
33
34
|
}
|
@@ -39,6 +40,7 @@ Method_filter_A = {
|
|
39
40
|
:name => 'my_methods',
|
40
41
|
:include => [/by.*/, 'compile', 'do_it'],
|
41
42
|
:exclude => ['my.*'],
|
43
|
+
:exclude_and_yield => ['blip'],
|
42
44
|
:default => false
|
43
45
|
}]
|
44
46
|
}
|
data/trace-util-adv.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{trace-util-adv}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-29}
|
13
13
|
s.description = %q{
|
14
14
|
Configure tracing using context sensitive filters, appenders, output templates in a completely non-intrusive fashion.
|
15
15
|
Tracing can even be applied runtime as a response when certain conditions occur}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trace-util-adv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristian Mandrup
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-29 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|