Class: Progstr::RailsLogger
- Defined in:
- lib/progstr/rails_logger.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ RailsLogger
constructor
A new instance of RailsLogger.
Constructor Details
#initialize ⇒ RailsLogger
Returns a new instance of RailsLogger.
3 4 5 |
# File 'lib/progstr/rails_logger.rb', line 3 def initialize super("Rails") end |
Class Method Details
.start(rails_config) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/progstr/rails_logger.rb', line 7 def self.start(rails_config) rails_config.after_initialize do Rails.logger = rails_config.logger = Progstr::RailsLogger.new #specific loggers for ActionController and ActiveRecord if defined? ActionController ActionController::Base.logger = Progstr::Logger.new("ActionController") end if defined? ActiveRecord ActiveRecord::Base.logger = Progstr::Logger.new("ActiveRecord") end end end |