Class: RedAlert::Rack::Notifier
- Inherits:
-
Object
- Object
- RedAlert::Rack::Notifier
show all
- Includes:
- Notifier
- Defined in:
- lib/red_alert/rack/notifier.rb
Instance Method Summary
collapse
Methods included from Notifier
#alert, included, #notifier_settings
Instance Method Details
#filter_keys ⇒ Object
6
7
8
|
# File 'lib/red_alert/rack/notifier.rb', line 6
def filter_keys
RACK_DEFAULT_FILTERS + PARAMS_DEFAULT_FILTERS
end
|
#template ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/red_alert/rack/notifier.rb', line 11
def template
"A <%= exception.class %> occured: <%= exception %>\n<% if data[:request] %>\n\n===================================================================\nRequest Body:\n===================================================================\n\n<%= data[:request].gsub(/^/, ' ') %>\n<% end %>\n\n===================================================================\nRack Environment:\n===================================================================\n\n PID: <%= $$ %>\n PWD: <%= Dir.getwd %>\n\n <%= data[:env].to_a.\n sort{|a,b| a.first <=> b.first}.\n map{ |k,v| \"%-25s%p\" % [k+':', v] }.\n join(\"\\n \") %>\n\n<% if exception.respond_to?(:backtrace) %>\n===================================================================\nBacktrace:\n===================================================================\n\n <%= exception.backtrace.join(\"\\n \") %>\n<% end %>\n"
end
|