logiku 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/logiku/formatters/key_value.rb +9 -1
- data/lib/logiku/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3c4ea141e5d17bb6798370748d5c7d8cd65ba01
|
4
|
+
data.tar.gz: e15b88ec085fce97ab5f7ffcff32dbba2c8efd25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8b42ef119b6b1b1bb35443ca6e0be3cfbe703f9504243c72c148a4561a560936acdf770cad118726349bca1dd85c21588fc90236096cfd60e2e05906143c4b8
|
7
|
+
data.tar.gz: c1c3c0a9a0d41604779870d9499de861d4d2d266f3af8a11cd08a200bc02a989b58b588eb85f55b32ad046cae27eb5be4796e76344ea77bd03e02e085b432c3d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -17,6 +17,7 @@ And then execute:
|
|
17
17
|
I recommend having the same log output for test and production environment, so apply the following settings in `config/environments/test.rb` and `production.rb`:
|
18
18
|
|
19
19
|
```ruby
|
20
|
+
config.action_dispatch.show_exceptions = false
|
20
21
|
config.lograge.enabled = true
|
21
22
|
config.lograge.formatter = Logiku::Formatters::KeyValue.new
|
22
23
|
config.logger = ActiveSupport::Logger.new(config.paths["log"].first)
|
@@ -1,7 +1,15 @@
|
|
1
1
|
module Logiku::Formatters
|
2
2
|
class KeyValue
|
3
|
+
attr_reader :filter
|
4
|
+
|
5
|
+
def initialize(filter = nil)
|
6
|
+
@filter = filter
|
7
|
+
end
|
8
|
+
|
3
9
|
def call(data)
|
4
|
-
"#{data.map { |k, v| format k, v }.join(" ")}\n"
|
10
|
+
message = "#{data.map { |k, v| format k, v }.join(" ")}\n"
|
11
|
+
message = filter.call(message) unless filter.nil?
|
12
|
+
message
|
5
13
|
end
|
6
14
|
|
7
15
|
private
|
data/lib/logiku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logiku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thilonel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,9 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.5.1
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: A log formatter gem.
|
103
103
|
test_files: []
|
104
|
-
has_rdoc:
|