rack-insight 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +13 -0
- data/Gemfile.lock +1 -1
- data/README.md +29 -0
- data/lib/rack/insight.rb +1 -0
- data/lib/rack/insight/instrumentation/instrument.rb +6 -2
- data/lib/rack/insight/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
== 0.5.7 / 2012-09-03 (Peter Boling)
|
2
|
+
|
3
|
+
* Bug Fixes
|
4
|
+
|
5
|
+
* require 'logger' important when using Ruby Logger
|
6
|
+
|
7
|
+
== 0.5.6 / 2012-08-31 (Peter Boling)
|
8
|
+
|
9
|
+
* Other
|
10
|
+
|
11
|
+
* Wrap debug logging in verbose check
|
12
|
+
* Documentation
|
13
|
+
|
1
14
|
== 0.5.5 / 2012-08-31 (Peter Boling)
|
2
15
|
|
3
16
|
* New Features
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -76,6 +76,35 @@ spec/fixtures folder for an example Sinatra app.
|
|
76
76
|
If you wish to use the logger panel define the LOGGER constant that is a ruby
|
77
77
|
Logger or ActiveSupport::BufferedLogger
|
78
78
|
|
79
|
+
Configure Rack::Insight
|
80
|
+
----------------------
|
81
|
+
|
82
|
+
Pattern:
|
83
|
+
|
84
|
+
Rack::Insight::Config.configure do |config|
|
85
|
+
config[:option] = value
|
86
|
+
end
|
87
|
+
|
88
|
+
Options:
|
89
|
+
|
90
|
+
:logger - Can be set to any Ruby-esque Logger, examples include the Rails Logger, or the Ruby Logger (default).
|
91
|
+
If you do not set logger Rack::Insight defaults to the Ruby Logger.
|
92
|
+
You can configure it with additional options:
|
93
|
+
:log_file - The logdev parameter for the Ruby Logger (a file path, an IO, like STDOUT, or STDERR, etc)
|
94
|
+
:log_level - The maximum severity at which things should be logged.
|
95
|
+
|
96
|
+
:rails_log_copy - If you are setting :logger to the Rails Logger, you should set this to false (default is true).
|
97
|
+
|
98
|
+
:verbosity - true is default .
|
99
|
+
true is equivalent to relying soley on the logger's log level to determine if a message is logged.
|
100
|
+
Other potential values are:
|
101
|
+
anything falsey => no logging at all
|
102
|
+
Rack::Insight::Logging::VERBOSITY[*level*] where *level* is one of:
|
103
|
+
:debug, :high, :med, :low, :silent
|
104
|
+
|
105
|
+
:panel_load_paths => [File::join('rack', 'insight', 'panels')] (default)
|
106
|
+
See *Configuring custom panels* section for example usage
|
107
|
+
|
79
108
|
Configuring custom panels
|
80
109
|
-------------------------
|
81
110
|
|
data/lib/rack/insight.rb
CHANGED
@@ -71,7 +71,9 @@ module Rack::Insight
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def start_event(method_call, arguments)
|
74
|
-
|
74
|
+
if verbose(:high)
|
75
|
+
logger.debug{ "Starting event: #{method_call.context} #{method_call.kind} #{method_call.method}" }
|
76
|
+
end
|
75
77
|
|
76
78
|
collectors_for(method_call).each do |collector|
|
77
79
|
collector.before_detect(method_call, arguments)
|
@@ -80,7 +82,9 @@ module Rack::Insight
|
|
80
82
|
|
81
83
|
def finish_event(method_call, arguments, start_time, result)
|
82
84
|
timing = Timing.new(@start, start_time, Time.now)
|
83
|
-
|
85
|
+
if verbose(:high)
|
86
|
+
logger.debug{ "Finishing event: #{method_call.context} #{method_call.kind} #{method_call.method}" }
|
87
|
+
end
|
84
88
|
collectors_for(method_call).each do |collector|
|
85
89
|
collector.after_detect(method_call, timing, arguments, result)
|
86
90
|
end
|
data/lib/rack/insight/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-insight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-
|
15
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|