sinatra-logger 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/logger.rb +4 -2
- data/lib/sinatra/logger/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: 3377c3b1cee746ff52f2f0059cc6b4d4cefeb4d4
|
4
|
+
data.tar.gz: 655674b6a4ef613e08b38d6c9308379d3ee53cdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d20411dd6066de22e06289746c08787b82bd29f84d6d8fa458c2c89336142befa70c3bdc4078641620a93770c128eebf5439ef8b7694e21f00dc63de8c693ca
|
7
|
+
data.tar.gz: ecdf77e8bd0e02bb0a5960df830e1cee30931e371aa6145a21506bdda8f590e12814ccf2abeca28ade4d0ac9833c43035fcdfec7c04e4ab1b4d902be584e313f
|
data/lib/sinatra/logger.rb
CHANGED
@@ -34,8 +34,10 @@ module Sinatra
|
|
34
34
|
set :logging, true
|
35
35
|
use ::Rack::CommonLogger, ::SemanticLogger["Access"]
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
if defined?(::ActiveRecord::Base)
|
38
|
+
# ActiveRecord Logger
|
39
|
+
::ActiveRecord::Base.logger = ::SemanticLogger["SQL"]
|
40
|
+
end
|
39
41
|
|
40
42
|
::Sinatra::Base.before do
|
41
43
|
::SemanticLogger.default_level = config[:level]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
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-
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic_logger
|