Class: UzuUzu::Wrapper::Logger
- Defined in:
- lib/uzuuzu-core/wrapper/logger.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(env = nil) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(env = nil) ⇒ Logger
Returns a new instance of Logger.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/uzuuzu-core/wrapper/logger.rb', line 14 def initialize(env=nil) begin if env.nil? || env.kind_of?(Array) || env['adapter'].nil? require 'uzuuzu-core/logger/loggers' @logger = ::UzuUzu::Logger::Loggers.new(env) else adapter = env['adapter'] require "uzuuzu-core/logger/#{adapter}" adapter_class = eval("::UzuUzu::Logger::#{adapter.camel_case}") @logger = adapter_class.new(env) end rescue => e $stderr.puts 'logger create error' $stderr.puts e $stderr.puts e.backtrace end end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
10 11 12 |
# File 'lib/uzuuzu-core/wrapper/logger.rb', line 10 def logger @logger end |