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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba08b7dc2d0f67611d145921981348c334749443
4
- data.tar.gz: ce4954d51c4200368f2f2da5e74d89f19c997abe
3
+ metadata.gz: a3c4ea141e5d17bb6798370748d5c7d8cd65ba01
4
+ data.tar.gz: e15b88ec085fce97ab5f7ffcff32dbba2c8efd25
5
5
  SHA512:
6
- metadata.gz: 9e3f0c4cfe38d297333319d42752641f63b3caf6395e30e39639fe7aa163174c4961d1657f879dbdedfb9cc5016f5c2bd48d7ffe02380a0183bccdb240b923d1
7
- data.tar.gz: 08fb9fc820ebdfb8240822af378cdc74802124fbf96121b91d3ab84f11eda7c0503d0166ae9160681da92d523ff1643d8b26301cf46beae29d98fc896dcdef98
6
+ metadata.gz: c8b42ef119b6b1b1bb35443ca6e0be3cfbe703f9504243c72c148a4561a560936acdf770cad118726349bca1dd85c21588fc90236096cfd60e2e05906143c4b8
7
+ data.tar.gz: c1c3c0a9a0d41604779870d9499de861d4d2d266f3af8a11cd08a200bc02a989b58b588eb85f55b32ad046cae27eb5be4796e76344ea77bd03e02e085b432c3d
@@ -3,3 +3,7 @@
3
3
  # 0.0.1
4
4
 
5
5
  * First public versioned release.
6
+
7
+ # 0.1.0
8
+
9
+ * KeyValue formatter can use a filter.
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
@@ -1,3 +1,3 @@
1
1
  module Logiku
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
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.1
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-02 00:00:00.000000000 Z
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.6.6
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: