Class: Asciidoctor::Logger

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

Defined Under Namespace

Modules: AutoFormattingMessage Classes: BasicFormatter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Logger

Returns a new instance of Logger.



8
9
10
11
12
13
# File 'lib/asciidoctor/logging.rb', line 8

def initialize *args
  super
  self.progname = 'asciidoctor'
  self.formatter = BasicFormatter.new
  self.level = WARN
end

Instance Attribute Details

#max_severityObject (readonly)



6
7
8
# File 'lib/asciidoctor/logging.rb', line 6

def max_severity
  @max_severity
end

Instance Method Details

#add(severity, message = nil, progname = nil) ⇒ Object



15
16
17
18
19
20
# File 'lib/asciidoctor/logging.rb', line 15

def add severity, message = nil, progname = nil
  if (severity ||= UNKNOWN) > (@max_severity ||= severity)
    @max_severity = severity
  end
  super
end