errlog 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/errlogr +4 -2
- data/lib/errlog.rb +3 -8
- data/lib/errlog/rails_controller_extensions.rb +6 -2
- data/lib/errlog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65181ee001218bc27b39fad26a4d7ae78dbcd476
|
4
|
+
data.tar.gz: a8e2ad45e7a803b646c0dd373121bae6993330ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b08bb5fd56db25996b049920aa008179bbf4aa19483797d0cdc46d80d02426be77bf7c29401fa603ad301de9cf1b13e355ffe61c3a1bf3da418ffd98b28e7ebd
|
7
|
+
data.tar.gz: 4973a36a2aa8f8ef7ead6f0520cb901721d31081e4cf841f1b46492579fba7e5eb2cc0d3d1cda852bf16d249aa8bbe4e128e9e85500f397799f7a06849c7be6e
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
*ATTENTION!*
|
4
4
|
|
5
|
-
This is a reporting tool tor errlog service
|
5
|
+
This is a reporting tool tor errlog.co service under development, not yet available fpr public.
|
6
6
|
|
7
7
|
|
8
8
|
The rest is a template for not to type it later on. Please ignore.
|
data/bin/errlogr
CHANGED
@@ -7,7 +7,7 @@ require 'colorize'
|
|
7
7
|
def usage
|
8
8
|
puts <<End
|
9
9
|
|
10
|
-
Errlog reporting tool (visit http://
|
10
|
+
Errlog reporting tool (visit http://errorlog.co for details)
|
11
11
|
|
12
12
|
Usage:
|
13
13
|
|
@@ -28,7 +28,7 @@ Parameters
|
|
28
28
|
set the platform value
|
29
29
|
|
30
30
|
-a appname
|
31
|
-
set the application name
|
31
|
+
set the application name. 'default' if not set.
|
32
32
|
|
33
33
|
Some/all of there parameters might be set in the .errlog.yml file in the current path
|
34
34
|
or down the tree. Command-line parameters override these from configuration file.
|
@@ -36,6 +36,8 @@ or down the tree. Command-line parameters override these from configuration file
|
|
36
36
|
Note that configuration file will not be used if both id and key are set in the command line
|
37
37
|
arguments!
|
38
38
|
|
39
|
+
See details at http://errorlog.co/help/cli
|
40
|
+
|
39
41
|
exit status: 100 - error in arguments, 10 - failed to send, 0 - successfully sent
|
40
42
|
End
|
41
43
|
exit 100
|
data/lib/errlog.rb
CHANGED
@@ -36,14 +36,9 @@ module Errlog
|
|
36
36
|
@@app_id, @@app_secret, @options = id, key, opts
|
37
37
|
@@app_name = opts[:app_name]
|
38
38
|
@@packager = packager @@app_id, @@app_secret
|
39
|
-
@@host = opts[:host] || "http://
|
39
|
+
@@host = opts[:host] || "http://errorlog.co"
|
40
40
|
@@client = HTTPClient.new
|
41
|
-
|
42
|
-
Rails.env
|
43
|
-
@@rails = true
|
44
|
-
rescue
|
45
|
-
@@rails = false
|
46
|
-
end
|
41
|
+
@@rails = defined?(Rails)
|
47
42
|
end
|
48
43
|
|
49
44
|
def self.app_name
|
@@ -51,7 +46,7 @@ module Errlog
|
|
51
46
|
end
|
52
47
|
|
53
48
|
def self.configured?
|
54
|
-
@@app_id && @@app_secret
|
49
|
+
defined?(@@app_id) && @@app_id && @@app_secret
|
55
50
|
end
|
56
51
|
|
57
52
|
def self.default_platform
|
@@ -27,8 +27,12 @@ module Errlog
|
|
27
27
|
yield
|
28
28
|
|
29
29
|
rescue Exception => e
|
30
|
-
|
31
|
-
|
30
|
+
if Errlog.configured?
|
31
|
+
errlog_collect_context ctx
|
32
|
+
ctx.report_exception e
|
33
|
+
else
|
34
|
+
rl.prev_logger.error 'Errlog is not configured, can not report an exception'
|
35
|
+
end
|
32
36
|
raise
|
33
37
|
|
34
38
|
ensure
|
data/lib/errlog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: errlog
|
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
|
- sergeych
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: boss-protocol
|