lib/locomotive/common/logger.rb in locomotivecms_common-0.0.3 vs lib/locomotive/common/logger.rb in locomotivecms_common-0.0.4
- old
+ new
@@ -53,10 +53,12 @@
end
class << self
%w(debug info warn error fatal unknown).each do |name|
define_method(name) do |message|
- self.instance.logger.send(name.to_sym, message)
+ if self.instance.logger
+ self.instance.logger.send(name.to_sym, message)
+ end
end
end
end
private