sinatra-logger 0.3.1 → 0.3.2

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: 3377c3b1cee746ff52f2f0059cc6b4d4cefeb4d4
4
- data.tar.gz: 655674b6a4ef613e08b38d6c9308379d3ee53cdb
3
+ metadata.gz: 15b59b6d06e34f0a1c5723300caa5aa2eb6a055b
4
+ data.tar.gz: 1706fad8493c9beee65a0a6e93aa057576602b9d
5
5
  SHA512:
6
- metadata.gz: 7d20411dd6066de22e06289746c08787b82bd29f84d6d8fa458c2c89336142befa70c3bdc4078641620a93770c128eebf5439ef8b7694e21f00dc63de8c693ca
7
- data.tar.gz: ecdf77e8bd0e02bb0a5960df830e1cee30931e371aa6145a21506bdda8f590e12814ccf2abeca28ade4d0ac9833c43035fcdfec7c04e4ab1b4d902be584e313f
6
+ metadata.gz: 361fc3da73b8fc49996fdadaa7d2aac21b38a726876a0020ca8d9d87d8a08274cf0b826b7eefa6b6465a3d6666af733e43a1056bde9f146d6e7529538b0f9d62
7
+ data.tar.gz: a9add41ba3e4b5501bd4230ab0f1b2380988550023de10d99537ecf8229b185a7ea2fb5aaf6837f35d0277789cea90513bb2f9d74b95072afdfb1cd4036fe48b
data/README.md CHANGED
@@ -70,6 +70,12 @@ end
70
70
 
71
71
  **NOTE**: You need to only use `logger filename: "", level: :trace` only once (precisely in the container app).
72
72
 
73
+
74
+ #### Requiring The Logger
75
+ ```
76
+ require 'sinatra/logger' # not 'sinatra-logger'
77
+ ```
78
+
73
79
  ### Development
74
80
 
75
81
  This gem is still in its beta phase. If you spot any errors, or propose some improvements, contact us: github [at] minodes [dot] com
@@ -79,6 +85,11 @@ This gem is still in its beta phase. If you spot any errors, or propose some imp
79
85
  Bug reports and pull requests are welcome on GitHub at https://github.com/minodes/sinatra-logger. We would love to see your suggestions, fixes or improvements.
80
86
 
81
87
  ## Version Updates
88
+ * 0.3.2
89
+ - Add the ability to configure SemanticLogger to write logs in different formats (through Sinatra Logger configuration)– @rabidscorpio pull request.
90
+ .
91
+ * 0.3.1
92
+ - BUG FIX: Make support for ActiveRecord logging optional (Check if ActiveRecord exists before handling it— @substars pull request).
82
93
  * 0.3.0
83
94
  - Add support for ActiveRecord logging
84
95
  * 0.2.6
@@ -31,6 +31,8 @@ module Sinatra
31
31
  config[:level] ||= :trace
32
32
  ::SemanticLogger.default_level = config[:level]
33
33
 
34
+ config[:formatter] ||= :color
35
+
34
36
  set :logging, true
35
37
  use ::Rack::CommonLogger, ::SemanticLogger["Access"]
36
38
 
@@ -42,7 +44,7 @@ module Sinatra
42
44
  ::Sinatra::Base.before do
43
45
  ::SemanticLogger.default_level = config[:level]
44
46
  ::SemanticLogger.appenders.each { |a| ::SemanticLogger.remove_appender(a) }
45
- ::SemanticLogger.add_appender(file_name: config[:filename], formatter: :color)
47
+ ::SemanticLogger.add_appender(file_name: config[:filename], formatter: config[:formatter])
46
48
 
47
49
  env["rack.errors"] = ::Sinatra::ErrorLogger.new
48
50
  env["rack.logger"] = ::SemanticLogger[self.class.name]
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Logger
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehya Abouelnaga
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-09 00:00:00.000000000 Z
11
+ date: 2017-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic_logger
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sinatra
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.12'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '10.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
69
  description: Sinatra Logging is a pain. This gem helps with wiring Access logs, Error
@@ -74,7 +74,7 @@ executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - ".gitignore"
77
+ - .gitignore
78
78
  - Gemfile
79
79
  - LICENSE.txt
80
80
  - README.md
@@ -94,17 +94,17 @@ require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - ">="
97
+ - - '>='
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - '>='
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.5.1
107
+ rubygems_version: 2.0.14.1
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: A gem that wires `SemanticLogger` to Sinatra painlessly