Class: Asciidoctor::Logger::BasicFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/asciidoctor/logging.rb

Constant Summary collapse

SEVERITY_LABEL_SUBSTITUTES =
{ 'WARN' => 'WARNING', 'FATAL' => 'FAILED' }

Instance Method Summary collapse

Instance Method Details

#call(severity, _, progname, msg) ⇒ Object



25
26
27
# File 'lib/asciidoctor/logging.rb', line 25

def call severity, _, progname, msg
  %(#{progname}: #{SEVERITY_LABEL_SUBSTITUTES[severity] || severity}: #{::String === msg ? msg : msg.inspect}#{LF})
end