Module: Support::Logging::ClassMethods
- Defined in:
- lib/logging.rb
Instance Method Summary collapse
Instance Method Details
#configure_logger(log = nil) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/logging.rb', line 19 def configure_logger(log=nil) if log @logger = log else @logger = Logger.new(STDOUT) @logger.level = Logger::INFO @logger.formatter = proc do |severity, datetime, progname, msg| # "#{datetime.strftime("%d.%m.(%X)")}#{"%5s" % severity}->#{msg}\n" "#{"%5s" % severity}->#{msg}\n" end end # branch end |
#logger ⇒ Object
11 12 13 |
# File 'lib/logging.rb', line 11 def logger @logger end |
#logger=(logger) ⇒ Object
15 16 17 |
# File 'lib/logging.rb', line 15 def logger=(logger) @logger = logger end |