lumber 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc DELETED
@@ -1,44 +0,0 @@
1
- = lumber
2
-
3
- Lumber tries to make it easy to use the more robust log4r[http://log4r.sourceforge.net/] logging system within your rails application.
4
- To do this it sets up log4r configuration from a yml file, and provides utility methods for adding a
5
- :logger accessor to classes dynamically as they get created. In the default setup shown below, calls
6
- to logger from a model/controller/mailer, will include that classes name in the log output.
7
-
8
- To use it, first "gem install lumber", run the lumber generator (./script generate lumber) to get the log4r.yml config file, then make the following edits
9
- to config/environment.rb:
10
-
11
- # before Rails::Initializer.run
12
- #
13
- require 'lumber'
14
- Lumber.init()
15
-
16
- # Setup parent loggers for some known rails Base classes. Classes that inherit
17
- # from these will have their logger as a parent so you can configure logging for
18
- # subtrees of classes in log4r.yml
19
- Lumber.setup_logger_hierarchy("ActiveRecord::Base", "rails::models")
20
- Lumber.setup_logger_hierarchy("ActionController::Base", "rails::controllers")
21
- Lumber.setup_logger_hierarchy("ActionMailer::Base", "rails::mailers")
22
-
23
- # If you really want, you can make all classes have a logger
24
- # Lumber.setup_logger_hierarchy("Object", "root::object")
25
-
26
- Additionally, you can also add loggers to individual classes by including the LumberLoggerSupport module
27
- class Foo
28
- include Lumber::LoggerSupport
29
- end
30
-
31
- and Foo.logger/Foo.new.logger will log to a logger named "rails::Foo". This creates a heirarchy of loggers for classes
32
- nested within modules, so you can use the namespace to enable/disable loggers
33
-
34
- If you want to change the log level for a different environment, add a line like below to the config/environments/<env>.rb
35
-
36
- # Set info as the default log level for production
37
- Log4r::Logger.root.level = Log4r::INFO
38
-
39
- You should be able to use lumber in a non-rails project too, but your call to Lumber.init will need to be different.
40
- I don't currently need to do this, so let me know if you have any problems.
41
-
42
- == Copyright
43
-
44
- Copyright (c) 2009 Matt Conway. See LICENSE for details.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.10.0