module Asciidoctor::IncludeExt::Logging

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

Public Instance Methods

default_logger() click to toggle source

@return [Logger] the default `Asciidoctor::Logger` if using Asciidoctor

1.5.7 or later, or Ruby's `Logger` that outputs to `STDERR`.
# File lib/asciidoctor/include_ext/logging.rb, line 13
def default_logger
  if defined? ::Asciidoctor::LoggerManager
    ::Asciidoctor::LoggerManager.logger
  else
    ::Logger.new(STDERR)
  end
end