hatchet 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/RELEASE.md +4 -0
- data/lib/hatchet/hatchet_logger.rb +61 -6
- data/lib/hatchet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a8f3bba951d0af7880faf8d61eaee4b82e45dd7
|
4
|
+
data.tar.gz: 8d295b2641278f9356f3421f99ea0d853006f45a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ccde4fad36c80d294a94d66beaee715823ff1c8ea716e4863d45490dd78b533d244beb9c0de8a023a050a58455ed0f5651a6228752448c4a93d4329c45776a1
|
7
|
+
data.tar.gz: 9510517dcb067265926129e7e6cb5a3df9e3be0f811125f8def4320acc4c0c5cb89bc3442a51b9aa79e3fbc8af3387e9b0c108432ca3f4e99592bb93c396668b
|
data/RELEASE.md
CHANGED
@@ -105,7 +105,7 @@ module Hatchet
|
|
105
105
|
# Returns nothing.
|
106
106
|
#
|
107
107
|
def debug(message = nil, error = nil, &block)
|
108
|
-
|
108
|
+
add_to_appenders(:debug, message, error, &block)
|
109
109
|
end
|
110
110
|
|
111
111
|
# Public: Returns true if any of the appenders will log messages for the
|
@@ -143,7 +143,7 @@ module Hatchet
|
|
143
143
|
# Returns nothing.
|
144
144
|
#
|
145
145
|
def info(message = nil, error = nil, &block)
|
146
|
-
|
146
|
+
add_to_appenders(:info, message, error, &block)
|
147
147
|
end
|
148
148
|
|
149
149
|
# Public: Returns true if any of the appenders will log messages for the
|
@@ -181,7 +181,7 @@ module Hatchet
|
|
181
181
|
# Returns nothing.
|
182
182
|
#
|
183
183
|
def warn(message = nil, error = nil, &block)
|
184
|
-
|
184
|
+
add_to_appenders(:warn, message, error, &block)
|
185
185
|
end
|
186
186
|
|
187
187
|
# Public: Returns true if any of the appenders will log messages for the
|
@@ -219,7 +219,7 @@ module Hatchet
|
|
219
219
|
# Returns nothing.
|
220
220
|
#
|
221
221
|
def error(message = nil, error = nil, &block)
|
222
|
-
|
222
|
+
add_to_appenders(:error, message, error, &block)
|
223
223
|
end
|
224
224
|
|
225
225
|
# Public: Returns true if any of the appenders will log messages for the
|
@@ -257,7 +257,7 @@ module Hatchet
|
|
257
257
|
# Returns nothing.
|
258
258
|
#
|
259
259
|
def fatal(message = nil, error = nil, &block)
|
260
|
-
|
260
|
+
add_to_appenders(:fatal, message, error, &block)
|
261
261
|
end
|
262
262
|
|
263
263
|
# Public: Returns true if any of the appenders will log messages for the
|
@@ -295,6 +295,61 @@ module Hatchet
|
|
295
295
|
@configuration.level level
|
296
296
|
end
|
297
297
|
|
298
|
+
# Public: Returns nil, exists for greater compatibility with things
|
299
|
+
# expecting a standard Logger.
|
300
|
+
#
|
301
|
+
def formatter
|
302
|
+
nil
|
303
|
+
end
|
304
|
+
|
305
|
+
# Public: No-op, exists for greater compatibility with things expecting a
|
306
|
+
# standard Logger.
|
307
|
+
#
|
308
|
+
def formatter=(formatter)
|
309
|
+
# no-op for Logger protocol compatibility
|
310
|
+
end
|
311
|
+
|
312
|
+
# Public: Adds a message to each appender at the specified level.
|
313
|
+
#
|
314
|
+
# level - The level of the message. One of, in decreasing order of
|
315
|
+
# severity:
|
316
|
+
#
|
317
|
+
# * Logger::FATAL
|
318
|
+
# * Logger::ERROR
|
319
|
+
# * Logger::WARN
|
320
|
+
# * Logger::INFO
|
321
|
+
# * Logger::DEBUG
|
322
|
+
# * :fatal
|
323
|
+
# * :error
|
324
|
+
# * :warn
|
325
|
+
# * :info
|
326
|
+
# * :debug
|
327
|
+
#
|
328
|
+
# message - The message that will be logged by an appender when it is
|
329
|
+
# configured to log at the given level or lower.
|
330
|
+
# block - An optional block which will provide a message when invoked.
|
331
|
+
#
|
332
|
+
# Writes messages to STDOUT if any appender fails to complete the enabled
|
333
|
+
# check or log the message.
|
334
|
+
#
|
335
|
+
# Also aliased as log.
|
336
|
+
#
|
337
|
+
# Returns nothing.
|
338
|
+
#
|
339
|
+
def add(severity, message = nil, progname = nil, &block)
|
340
|
+
level = STANDARD_TO_SYMBOL[severity] || severity
|
341
|
+
add_to_appenders(level, message, nil, &block)
|
342
|
+
end
|
343
|
+
|
344
|
+
alias log add
|
345
|
+
|
346
|
+
# Public: No-op, exists for greater compatibility with things expecting a
|
347
|
+
# standard Logger.
|
348
|
+
#
|
349
|
+
def <<(msg)
|
350
|
+
nil
|
351
|
+
end
|
352
|
+
|
298
353
|
private
|
299
354
|
|
300
355
|
# Private: Adds a message to each appender at the specified level.
|
@@ -319,7 +374,7 @@ module Hatchet
|
|
319
374
|
#
|
320
375
|
# Returns nothing.
|
321
376
|
#
|
322
|
-
def
|
377
|
+
def add_to_appenders(level, message, error, &block)
|
323
378
|
return unless message or block
|
324
379
|
|
325
380
|
msg = Message.new(ndc: @ndc.context.clone, message: message, error: error, &block)
|
data/lib/hatchet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hatchet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garry Shutler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Logging library that provides the ability to add class/module specific
|
14
14
|
filters
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 2.0.
|
75
|
+
rubygems_version: 2.0.7
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Logging library that provides the ability to add class/module specific filters
|