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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9fed786239c01a5346c6e93e7c2656bf5ae4616
4
- data.tar.gz: eb0340cb109e2ae9ad88e401530d827b47961269
3
+ metadata.gz: 996a82f534fa1a3877a7e06053872b349ebbb4e5
4
+ data.tar.gz: 7c9c7e45c9c117a92b3a29e58ab62da46a108725
5
5
  SHA512:
6
- metadata.gz: 0d65d820bfbfa99b60884afdad5eb8650aa96b4daa0cef62fe7d5a37e4db398bf29a6990d9026a2b6208c9bcf5c56758f21811b1fe512277a7f7a814c3c72896
7
- data.tar.gz: 7b0c58a3d2f17315d980c5e72999fcd763ab964eadc56abb70245a14443fa91284b5572fcef4f445522c1f2039d4ae473d0a33c7d689559434a4050b2f0644e2
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)
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.3)
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
- TODO: Write usage instructions here
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
 
@@ -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::INFO => 1,
13
- Logatron::WARN => 2,
14
- Logatron::ERROR => 3,
15
- Logatron::CRITICAL => 4,
16
- Logatron::FATAL => 5
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
@@ -5,7 +5,7 @@ require 'logatron/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'logatron'
8
- spec.version = '0.2.4'
8
+ spec.version = '0.2.5'
9
9
  spec.authors = ['Justin Grimes']
10
10
  spec.email = ['justin.mgrimes@gmail.com']
11
11
 
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
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-02-03 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport