forked from edavis10/redmine-exception-handler-plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
/
init.rb
26 lines (21 loc) · 943 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'redmine'
Redmine::Plugin.register :redmine_exception_handler do
name 'Redmine Exception Handler plugin'
author 'Eric Davis'
description 'Send emails when exceptions occur in Redmine.'
version ExceptionHandler::VERSION.to_s
requires_redmine :version_or_higher => '3.0.0'
settings :default => {
'exception_handler_recipients' => '[email protected], [email protected]',
'exception_handler_sender_address' => 'Application Error <[email protected]>',
'exception_handler_prefix' => '[ERROR] ',
'exception_handler_email_format' => 'text'
}, :partial => 'settings/exception_handler_settings'
end
require_dependency 'exception_notification'
require_dependency 'exception_notifier'
ExceptionNotifier.send(:include, ExceptionHandler::RedmineNotifierPatch)
RedmineApp::Application.config.middleware.use ExceptionNotification::Rack,
:email => {
:sections => %w(request session environment backtrace)
}