light-service 0.8.2 → 0.8.3

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: 65ef2c9c99bebb3e4b19a0fbfc63c893381fbfe4
4
- data.tar.gz: 6962376a614207f0475112a1f21c1872876ec865
3
+ metadata.gz: bd457f452026a64465b3d6da771be7ed69547580
4
+ data.tar.gz: d330c6b02f86878cb314786b36fff478dfa3fa20
5
5
  SHA512:
6
- metadata.gz: 7ea257de8c459ecccbcb0d702c61c603f45c3d6bc50f2a829925ecbe2af4e1fbeb0eee277a9005c99a1f928087610ce02e8317b63e13e329f8b4c2328958b997
7
- data.tar.gz: 768698a21f441add9d09ec47eed6cc8384b1babb232c1778a3abbdf0531ac8179eb3b47c75c16e07db77b2fe14870fd29e65cd022b45f9b458e02e8a92a9d77e
6
+ metadata.gz: f054267b74b35a40a6f0a9f007e2144d375c9574b593a7f116a252df196e413e2b90476222d31ae11f92fe5b08847a3956f970d16e5ca09d8fc6f15809ae8bf1
7
+ data.tar.gz: '018c3672a0eaf6a526495607066ea499d3488608cd855694f5d2053583a2a62618b11f0b3b30cd50fe09e6e3ec60f5172546de7834c7f11319d4236f72c935a2'
data/RELEASES.md CHANGED
@@ -1,5 +1,8 @@
1
1
  A brief list of new features and changes introduced with the specified version.
2
2
 
3
+ ### 0.8.3
4
+ * Make logging more [efficient](https://github.com/adomokos/light-service/pull/120) the context.
5
+
3
6
  ### 0.8.2
4
7
  * A better way to [inspect](https://github.com/adomokos/light-service/pull/110) the context.
5
8
  * [Short-circuiting](https://github.com/adomokos/light-service/pull/113) the Orchestrator methods.
@@ -16,7 +16,7 @@ module LightService
16
16
 
17
17
  def _default_logger
18
18
  logger = Logger.new("/dev/null")
19
- logger.level = Logger::INFO
19
+ logger.level = Logger::WARN
20
20
  logger
21
21
  end
22
22
  end
@@ -13,12 +13,14 @@ module LightService
13
13
  end
14
14
 
15
15
  def with(data = {})
16
- logger.info("[LightService] - calling organizer <#{organizer}>")
16
+ logger.info { "[LightService] - calling organizer <#{organizer}>" }
17
17
 
18
18
  decorated.with(data)
19
19
 
20
- logger.info("[LightService] - keys in context: " \
21
- "#{extract_keys(decorated.context.keys)}")
20
+ logger.info do
21
+ "[LightService] - keys in context: " \
22
+ "#{extract_keys(decorated.context.keys)}"
23
+ end
22
24
  self
23
25
  end
24
26
 
@@ -48,6 +50,8 @@ module LightService
48
50
  private
49
51
 
50
52
  def write_log(action, context)
53
+ return unless logger.info?
54
+
51
55
  logger.info("[LightService] - executing <#{action}>")
52
56
  log_expects(action)
53
57
  log_promises(action)
@@ -88,6 +92,8 @@ module LightService
88
92
  end
89
93
 
90
94
  def write_skip_remaining_log(context, action)
95
+ return unless logger.info?
96
+
91
97
  msg = "[LightService] - ;-) <#{action}> has decided " \
92
98
  "to skip the rest of the actions"
93
99
  logger.info(msg)
@@ -1,3 +1,3 @@
1
1
  module LightService
2
- VERSION = "0.8.2".freeze
2
+ VERSION = "0.8.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Attila Domokos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-17 00:00:00.000000000 Z
11
+ date: 2017-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.6.8
185
+ rubygems_version: 2.6.13
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: A service skeleton with an emphasis on simplicity