logging 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/logging.rb +8 -5
- metadata +2 -2
data/History.txt
CHANGED
data/lib/logging.rb
CHANGED
@@ -22,7 +22,7 @@ require? 'fastthread'
|
|
22
22
|
module Logging
|
23
23
|
|
24
24
|
# :stopdoc:
|
25
|
-
VERSION = '1.1.
|
25
|
+
VERSION = '1.1.4'
|
26
26
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
27
27
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
28
28
|
LEVELS = {}
|
@@ -452,6 +452,12 @@ module Logging
|
|
452
452
|
def log_internal( level = 1, &block )
|
453
453
|
::Logging::Logger[::Logging].__send__(levelify(LNAMES[level]), &block)
|
454
454
|
end
|
455
|
+
|
456
|
+
# Close all appenders
|
457
|
+
def shutdown
|
458
|
+
log_internal {'shutdown called - closing all appenders'}
|
459
|
+
::Logging::Appenders.each {|appender| appender.close}
|
460
|
+
end
|
455
461
|
# :startdoc:
|
456
462
|
end
|
457
463
|
end # module Logging
|
@@ -475,10 +481,7 @@ require Logging.libpath(%w[logging config yaml_configurator])
|
|
475
481
|
# This is needed for closing IO streams and connections to the syslog server
|
476
482
|
# or e-mail servers, etc.
|
477
483
|
#
|
478
|
-
at_exit {
|
479
|
-
Logging.log_internal {'at_exit hook called - closing all appenders'}
|
480
|
-
Logging::Appenders.each {|appender| appender.close}
|
481
|
-
}
|
484
|
+
at_exit {Logging.shutdown}
|
482
485
|
|
483
486
|
end # unless defined?
|
484
487
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-28 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|