exception_log 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,4 +1,34 @@
1
1
  exception_log
2
2
  =============
3
3
 
4
- send rails exception to email and give web ui to watch exception, and it's live stream
4
+ send rails exception to email and give web ui to watch exception, and it's live stream
5
+
6
+ ## Requirements
7
+
8
+ Tested success by ruby 1.9.x + rails 3.2.x
9
+
10
+ ## config
11
+
12
+ Gemfile
13
+
14
+ gem 'exception_log', '0.2.0', require: 'exception_log'
15
+
16
+ config/environments/production.rb
17
+
18
+ config.middleware.use ExceptionLog::Middleware, :from => 'noreply@xx.com', :to => ['foo@xx.com','bar@xx.com']
19
+
20
+ options:
21
+
22
+ :log_path 500 error write to file path, default is Rails.root/log/exception.log
23
+
24
+ config/exception_log.yml
25
+
26
+ host: "192.168.9.35"
27
+ log: "/data/projects/entos/log/exception.log"
28
+
29
+ ## start node server
30
+
31
+ rake exception_log:start_node_server
32
+
33
+ That's ALL, open `http://localhost:1337` to watch live stream log.
34
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -5,7 +5,7 @@ module ExceptionLog
5
5
  def exception_mail(body,options = {})
6
6
  from = options[:from]
7
7
  to = options[:to]
8
- subject = "NOTICE,your site raise a exception!"
8
+ subject = "NOTICE,your site raise an exception!"
9
9
  body = body
10
10
  mail(:from=>from, :to => to, :subject => subject, :body => body)
11
11
  end
data/lib/exception_log.rb CHANGED
@@ -1,2 +1,4 @@
1
1
  require File.expand_path("../exception_log/middleware.rb",__FILE__)
2
- require File.expand_path("../exception_log/version.rb",__FILE__)
2
+ require File.expand_path("../exception_log/version.rb",__FILE__)
3
+
4
+ load "tasks/exception_log.rake"
@@ -0,0 +1,10 @@
1
+ namespace :exception_log do
2
+
3
+ desc "Start the ExceptionLog Node server"
4
+ task :start_node_server do
5
+ cfg = YAML::load(File.open(File.expand_path("#{Rails.root}/config/exception_log.yml",__FILE__)))
6
+ server_js = File.expand_path("../../nodejs/server.js",__FILE__)
7
+ Kernel.system "node #{server_js} -host=#{cfg['host']} -log=#{cfg['log']}"
8
+ end
9
+
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-08 00:00:00.000000000 Z
12
+ date: 2013-07-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: rails exception send to email, and watch in web ui interface
15
15
  email:
@@ -26,6 +26,7 @@ files:
26
26
  - lib/exception_log/version.rb
27
27
  - lib/exception_log/handler.rb
28
28
  - lib/nodejs/server.js
29
+ - lib/tasks/exception_log.rake
29
30
  - lib/exception_log.rb
30
31
  homepage: http://github.com/wxianfeng/exception_log
31
32
  licenses: []
@@ -41,7 +42,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
41
42
  version: '0'
42
43
  segments:
43
44
  - 0
44
- hash: -3635286804832592620
45
+ hash: 1086227362856763353
45
46
  required_rubygems_version: !ruby/object:Gem::Requirement
46
47
  none: false
47
48
  requirements: