semantic_logger 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/semantic_logger/logger.rb +6 -3
- data/lib/semantic_logger/version.rb +1 -1
- metadata +3 -3
@@ -138,11 +138,11 @@ module SemanticLogger
|
|
138
138
|
if self.payload
|
139
139
|
payload = payload.nil? ? self.payload : self.payload.merge(payload)
|
140
140
|
end
|
141
|
-
self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, payload, start, Time.now - start, tags)
|
141
|
+
self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, payload, start, 1000.0 * (Time.now - start), tags)
|
142
142
|
result
|
143
143
|
rescue Exception => exc
|
144
144
|
# TODO Need to be able to have both an exception and a Payload
|
145
|
-
self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, exc, start, Time.now - start, tags)
|
145
|
+
self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, exc, start, 1000.0 * (Time.now - start), tags)
|
146
146
|
raise exc
|
147
147
|
end
|
148
148
|
else
|
@@ -230,10 +230,13 @@ module SemanticLogger
|
|
230
230
|
reply_queue.pop
|
231
231
|
end
|
232
232
|
|
233
|
-
# Internal logger for
|
233
|
+
# Internal logger for SemanticLogger
|
234
234
|
# For example when an appender is not working etc..
|
235
235
|
# By default logs to STDERR, replace with another Ruby logger or Rails
|
236
236
|
# logger, but never to SemanticLogger itself
|
237
|
+
#
|
238
|
+
# Warning: Do not use this logger directly it is intended for internal logging
|
239
|
+
# within Semantic Logger itself
|
237
240
|
sync_cattr_accessor :logger do
|
238
241
|
require 'logger'
|
239
242
|
l = ::Logger.new(STDOUT)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 1
|
9
|
+
version: 0.4.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Reid Morrison
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-09-
|
17
|
+
date: 2012-09-07 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|