Class: Kramdown::PlantUml::ConsoleLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/kramdown-plantuml/console_logger.rb

Overview

Logs to $stdout and $stderr

Constant Summary collapse

LOG_LEVELS =
%i[debug info warn error].freeze

Instance Method Summary collapse

Constructor Details

#initialize(level) ⇒ ConsoleLogger

Returns a new instance of ConsoleLogger.



11
12
13
# File 'lib/kramdown-plantuml/console_logger.rb', line 11

def initialize(level)
  @configured_log_level = level
end

Instance Method Details

#debug(message) ⇒ Object



15
16
17
# File 'lib/kramdown-plantuml/console_logger.rb', line 15

def debug(message)
  write(:debug, message)
end

#error(message) ⇒ Object



27
28
29
# File 'lib/kramdown-plantuml/console_logger.rb', line 27

def error(message)
  write(:error, message)
end

#info(message) ⇒ Object



19
20
21
# File 'lib/kramdown-plantuml/console_logger.rb', line 19

def info(message)
  write(:info, message)
end

#warn(message) ⇒ Object



23
24
25
# File 'lib/kramdown-plantuml/console_logger.rb', line 23

def warn(message)
  write(:warn, message)
end