semantic_logger 2.4.0 → 2.4.1

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: 986fd023dd3d5b61817027e25aeae6b6919f65f2
4
- data.tar.gz: 7c94accd89688c3ee66fb05c1f17eaba10183abb
3
+ metadata.gz: 24d556e477347252ddf0b9ec58747b066a72d3de
4
+ data.tar.gz: 4a3ed8b3b1fb893903194cf3ed672a039a974b48
5
5
  SHA512:
6
- metadata.gz: 48eeadcce9890d4d8adb53c8a76c98b259a230f8c7c0c41f3d2ae62ce94bfc850a51c7e6a143064590960aac5e0b12759ec01a396ff9bad93459ecfc81b48778
7
- data.tar.gz: ce6a05fe76874b04e2a28bfaf0a09aeb790c9fdc119744dd0b975e22286402a0c62909d67f04fe6d885ed1873397e9b31614528ea285ec696d30a69ab852bafd
6
+ metadata.gz: 9ca1d356e5b4d8d3bcb7d5f71616c0189d0cde904bbea832e0e9ec08d1dc8faad5e367eebe456668fa3c4e1ab5515a9eea8542520acbaad1f4f22bc7e2c520fb
7
+ data.tar.gz: c0a06161e582b5b979f96c65ac32f7329fe5aa56f714bc6e3da81e19cfb73027ebb0a114d8e8bfd919d0a718308dc45edb98adb28efb3ad80c5b468685d1393b
@@ -118,23 +118,21 @@ module SemanticLogger
118
118
  end_time = Time.now
119
119
  duration = 1000.0 * (end_time - start)
120
120
 
121
- # Only log if the block took longer than 'min_duration' to complete
122
- if duration >= min_duration
123
- # Add scoped payload
124
- if self.payload
125
- payload = payload.nil? ? self.payload : self.payload.merge(payload)
126
- end
127
- if exception
128
- case log_exception
129
- when :full
130
- log Log.new(:#{level}, self.class.thread_name, name, message, payload, end_time, duration, tags, #{index}, exception)
131
- when :partial
132
- log Log.new(:#{level}, self.class.thread_name, name, "\#{message} -- Exception: \#{exception.class}: \#{exception.message}", payload, end_time, duration, tags, #{index}, nil)
133
- end
134
- raise exception
135
- else
136
- log Log.new(:#{level}, self.class.thread_name, name, message, payload, end_time, duration, tags, #{index}, nil)
121
+ # Add scoped payload
122
+ if self.payload
123
+ payload = payload.nil? ? self.payload : self.payload.merge(payload)
124
+ end
125
+ if exception
126
+ case log_exception
127
+ when :full
128
+ log Log.new(:#{level}, self.class.thread_name, name, message, payload, end_time, duration, tags, #{index}, exception)
129
+ when :partial
130
+ log Log.new(:#{level}, self.class.thread_name, name, "\#{message} -- Exception: \#{exception.class}: \#{exception.message}", payload, end_time, duration, tags, #{index}, nil)
137
131
  end
132
+ raise exception
133
+ elsif duration >= min_duration
134
+ # Only log if the block took longer than 'min_duration' to complete
135
+ log Log.new(:#{level}, self.class.thread_name, name, message, payload, end_time, duration, tags, #{index}, nil)
138
136
  end
139
137
  end
140
138
  else
@@ -1,3 +1,3 @@
1
1
  module SemanticLogger #:nodoc
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-25 00:00:00.000000000 Z
11
+ date: 2013-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sync_attr