Module: Asciidoctor::Html5s::Logging

Defined in:
lib/asciidoctor/html5s/logger.rb

Overview

Helper module for getting default Logger based on the Asciidoctor version.

Class Method Summary collapse

Class Method Details

.default_loggerLogger

Returns the default ‘Asciidoctor::Logger` if using Asciidoctor 1.5.7 or later, or Ruby’s ‘Logger` that outputs to `STDERR`.

Returns:

  • (Logger)

    the default ‘Asciidoctor::Logger` if using Asciidoctor 1.5.7 or later, or Ruby’s ‘Logger` that outputs to `STDERR`.



13
14
15
16
17
18
19
# File 'lib/asciidoctor/html5s/logger.rb', line 13

def default_logger
  if defined? ::Asciidoctor::LoggerManager
    ::Asciidoctor::LoggerManager.logger
  else
    ::Logger.new(STDERR)
  end
end