TwP-logging 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.1.3 / 2009-05-13
2
+
3
+ 1 bug fix
4
+ - Fixing an alias bug on the JRuby platform
5
+
1
6
  == 1.1.2 / 2009-05-05
2
7
 
3
8
  1 minor enhancement
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Appenders are used to output log events to some logging destination. The
3
4
  # same log event can be sent to multiple desitnations by associating
@@ -42,3 +43,5 @@
42
43
  # These messages will be logged to both the log file and to STDOUT
43
44
  log.debug "a very nice little debug message"
44
45
  log.warn "this is your last warning"
46
+
47
+ # :startdoc:
data/examples/classes.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # The Logging framework is very good about figuring out predictable names
3
4
  # for loggers regardless of what object is used to create them. The name is
@@ -37,3 +38,4 @@
37
38
  foo.info 'this message came from Foo'
38
39
  bar.warn 'this is a warning from Foo::Bar'
39
40
 
41
+ # :startdoc:
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Logging support can be included globally giving all objects in the Ruby
3
4
  # space access to a logger instance. This "logger" method invokes
@@ -79,3 +80,4 @@
79
80
  end
80
81
  end
81
82
 
83
+ # :startdoc:
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Any Ruby object can be passed to the log methods of a logger. How these
3
4
  # objects are formatted by the Logging framework is controlled by a global
@@ -47,3 +48,4 @@
47
48
  log.error err
48
49
  end
49
50
 
51
+ # :startdoc:
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Loggers exist in a hierarchical relationship defined by their names. Each
3
4
  # logger has a parent (except for the root logger). A logger can zero or
@@ -69,3 +70,4 @@
69
70
  puts '='*76
70
71
  Logging.show_configuration
71
72
 
73
+ # :startdoc:
data/examples/layouts.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # The formatting of log messages is controlled by the layout given to the
3
4
  # appender. By default all appenders use the Basic layout. It's pretty
@@ -43,3 +44,5 @@
43
44
  log.warn "this is your last warning"
44
45
  log.error StandardError.new("something went horribly wrong")
45
46
  log.fatal "I Die!"
47
+
48
+ # :startdoc:
data/examples/loggers.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Multiple loggers can be created and each can be configured with it's own
3
4
  # log level and appenders. So one logger can be configured to output debug
@@ -24,3 +25,5 @@
24
25
  log1.info "this message will not get logged"
25
26
  log2.info "nor will this message"
26
27
  log3.info "but this message will get logged"
28
+
29
+ # :startdoc:
data/examples/names.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Loggers and appenders can be looked up by name. The bracket notation is
3
4
  # used to find these objects:
@@ -38,3 +39,5 @@
38
39
  # and now log some messages
39
40
  Logging.logger['Critical'].info 'just keeping you informed'
40
41
  Logging.logger['Critical'].fatal 'WTF!!'
42
+
43
+ # :startdoc:
data/examples/simple.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # :stopdoc:
1
2
  #
2
3
  # Logging provides a simple, default logger configured in the same manner as
3
4
  # the default Ruby Logger class -- i.e. the output of the two will be the
@@ -12,3 +13,5 @@
12
13
 
13
14
  log.debug "this debug message will not be output by the logger"
14
15
  log.warn "this is your last warning"
16
+
17
+ # :startdoc:
data/lib/logging.rb CHANGED
@@ -22,7 +22,7 @@ require? 'fastthread'
22
22
  module Logging
23
23
 
24
24
  # :stopdoc:
25
- VERSION = '1.1.2'
25
+ VERSION = '1.1.3'
26
26
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
27
27
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
28
28
  LEVELS = {}
@@ -26,7 +26,7 @@ module Logging::Config
26
26
  raise Error, "missing configuration block" unless block
27
27
 
28
28
  dsl = TopLevelDSL.new
29
- dsl.__instance_eval(&block)
29
+ dsl.instance_eval(&block)
30
30
 
31
31
  pre_config dsl.__pre_config
32
32
  ::Logging::Logger[:root] # ensures the log levels are defined
@@ -130,15 +130,13 @@ module Logging::Config
130
130
  end
131
131
 
132
132
  class DSL
133
- alias :__instance_eval :instance_eval
134
-
135
133
  instance_methods.each do |m|
136
- undef_method m unless m[%r/^(__|object_id)/]
134
+ undef_method m unless m[%r/^(__|object_id|instance_eval)/]
137
135
  end
138
136
 
139
137
  def self.process( &block )
140
138
  dsl = new
141
- dsl.__instance_eval(&block)
139
+ dsl.instance_eval(&block)
142
140
  dsl.__hash
143
141
  end
144
142
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TwP-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
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-05 00:00:00 -07:00
12
+ date: 2009-05-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency