Class: Asciidoctor::Logger
- Inherits:
-
Logger
- Object
- Logger
- Asciidoctor::Logger
- Defined in:
- lib/asciidoctor/logging.rb
Defined Under Namespace
Modules: AutoFormattingMessage Classes: BasicFormatter
Instance Attribute Summary collapse
- #max_severity ⇒ Object readonly
Instance Method Summary collapse
- #add(severity, message = nil, progname = nil) ⇒ Object
-
#initialize(*args) ⇒ Logger
constructor
A new instance of Logger.
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_severity ⇒ Object (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, = nil, progname = nil if (severity ||= UNKNOWN) > (@max_severity ||= severity) @max_severity = severity end super end |