class Moodle2CC::OutputLogger
Note: the public interface for Moodle2CC::Logger
is really add_warning, which tries that method on the logger and then falls back to a more standard warm method. But it really doesn't expect the logger to implement the standard logger interface. Eventually it should probably be renamed to something else, and this class should be renamed to just Logger
(once usage of the existing logger is moved over). OR potentially they could be combined so that “warn” level has special functionality.
Public Class Methods
logger()
click to toggle source
# File lib/moodle2cc/output_logger.rb, line 10 def self.logger Thread.current[:__moodle2cc_output_logger__] ||= ::Logger.new(STDOUT) end
logger=(logger)
click to toggle source
# File lib/moodle2cc/output_logger.rb, line 14 def self.logger=(logger) Thread.current[:__moodle2cc_output_logger__] = logger end