logatron 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +10 -1
- data/lib/logatron/basic_logger.rb +0 -4
- data/lib/logatron/const.rb +13 -11
- data/logatron.gemspec +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: 996a82f534fa1a3877a7e06053872b349ebbb4e5
|
4
|
+
data.tar.gz: 7c9c7e45c9c117a92b3a29e58ab62da46a108725
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d16b54849df41e7d97b11888acdfafede8d0a11b73f1c7a70f5a3cc9c06202b412e1d0d016c312dc64612b36095b1a7a2483aa268c4badce4c17c9d5535c2304
|
7
|
+
data.tar.gz: caba7a2dfc16ecc7be6e5da47896fbce5c9911cf7f345962674d2e2ebd9f6b94f1017e99fa8b6eea2e8d37008ec2ebc7e1b090b22fbd76638e2933262509d18d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
logatron (0.2.
|
4
|
+
logatron (0.2.5)
|
5
5
|
activesupport (~> 4.2, >= 4.2.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
diff-lcs (1.2.5)
|
18
18
|
i18n (0.7.0)
|
19
19
|
json (1.8.3)
|
20
|
-
minitest (5.8.
|
20
|
+
minitest (5.8.4)
|
21
21
|
rake (10.4.2)
|
22
22
|
rspec (3.3.0)
|
23
23
|
rspec-core (~> 3.3.0)
|
data/README.md
CHANGED
@@ -22,7 +22,16 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
### Severities
|
26
|
+
Severities are used to examine and filter server logs, create alerts, and analyze user behavior.
|
27
|
+
|
28
|
+
* Debug - use for fixing production bugs or deeper inspection into behavior
|
29
|
+
* Invalid Use - use for user errors due to invalid inputs
|
30
|
+
* Info - use for general information (successful operations, ec.)
|
31
|
+
* Warn - use for recoverable errors
|
32
|
+
* Error - use for known unrecoverable errors
|
33
|
+
* Critical - use for unknown unrecoverable errors (system-level rescues)
|
34
|
+
* Fatal - use for system errors
|
26
35
|
|
27
36
|
## Development
|
28
37
|
|
@@ -6,8 +6,6 @@ module Logatron
|
|
6
6
|
class BasicLogger
|
7
7
|
include Logatron::Formatting
|
8
8
|
|
9
|
-
|
10
|
-
|
11
9
|
def level=(a_level)
|
12
10
|
Logatron.configuration.logger.level = SEVERITY_MAP[a_level]
|
13
11
|
end
|
@@ -53,8 +51,6 @@ module Logatron
|
|
53
51
|
def write(string,severity)
|
54
52
|
Logatron.configuration.logger.log(severity, string)
|
55
53
|
end
|
56
|
-
|
57
54
|
end
|
58
|
-
|
59
55
|
end
|
60
56
|
|
data/lib/logatron/const.rb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
module Logatron
|
2
|
-
WARN = 'WARN'
|
3
|
-
INFO = 'INFO'
|
4
|
-
ERROR = 'ERROR'
|
5
|
-
CRITICAL = 'CRITICAL'
|
6
|
-
FATAL = 'FATAL'
|
7
|
-
DEBUG = 'DEBUG'
|
2
|
+
WARN = 'WARN'.freeze
|
3
|
+
INFO = 'INFO'.freeze
|
4
|
+
ERROR = 'ERROR'.freeze
|
5
|
+
CRITICAL = 'CRITICAL'.freeze
|
6
|
+
FATAL = 'FATAL'.freeze
|
7
|
+
DEBUG = 'DEBUG'.freeze
|
8
|
+
INVALID_USE = 'INVALID_USE'.freeze
|
8
9
|
MSG_ID = :msg_id
|
9
10
|
SITE = :site
|
10
11
|
SEVERITY_MAP = {
|
11
12
|
Logatron::DEBUG => 0,
|
12
|
-
Logatron::
|
13
|
-
Logatron::
|
14
|
-
Logatron::
|
15
|
-
Logatron::
|
16
|
-
Logatron::
|
13
|
+
Logatron::INVALID_USE => 1,
|
14
|
+
Logatron::INFO => 2,
|
15
|
+
Logatron::WARN => 3,
|
16
|
+
Logatron::ERROR => 4,
|
17
|
+
Logatron::CRITICAL => 5,
|
18
|
+
Logatron::FATAL => 6
|
17
19
|
}
|
18
20
|
end
|
data/logatron.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logatron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Grimes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|