Module: Asciidoctor::LoggerManager

Defined in:
lib/asciidoctor/logging.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.logger_classObject



84
85
86
# File 'lib/asciidoctor/logging.rb', line 84

def logger_class
  @logger_class
end

Class Method Details

.logger(pipe = $stderr) ⇒ Object

NOTE subsequent calls to logger access the logger via the logger property directly



87
88
89
90
# File 'lib/asciidoctor/logging.rb', line 87

def logger pipe = $stderr
  memoize_logger
  @logger ||= (@logger_class.new pipe)
end

.logger=(new_logger) ⇒ Object

Returns the specified Logger



93
94
95
# File 'lib/asciidoctor/logging.rb', line 93

def logger= new_logger
  @logger = new_logger || (@logger_class.new $stderr)
end