Class: Howitzer::Log

Inherits:
Object
  • Object
show all
Includes:
Log4r, Singleton
Defined in:
lib/howitzer/log.rb

Overview

This class represents logger

Instance Method Summary collapse

Instance Method Details

#debug(msg) ⇒ Object

Outputs debug message if Howitzer.debug_mode == true


20
21
22
# File 'lib/howitzer/log.rb', line 20

def debug(msg)
  @logger.debug(msg)
end

#error(msg) ⇒ Object

Outputs error message


41
42
43
# File 'lib/howitzer/log.rb', line 41

def error(msg)
  @logger.error(msg)
end

#fatal(msg) ⇒ Object

Outputs fatal message


48
49
50
# File 'lib/howitzer/log.rb', line 48

def fatal(msg)
  @logger.fatal(msg)
end

#info(msg) ⇒ Object

Outputs info message


27
28
29
# File 'lib/howitzer/log.rb', line 27

def info(msg)
  @logger.info(msg)
end

Outputs a feature name into the log with INFO severity


55
56
57
# File 'lib/howitzer/log.rb', line 55

def print_feature_name(text)
  log_without_formatting { info "*** Feature: #{text.upcase} ***" }
end

Outputs a scenario name into log with INFO severity


68
69
70
# File 'lib/howitzer/log.rb', line 68

def print_scenario_name(text)
  log_without_formatting { info " => Scenario: #{text}" }
end

#settings_as_formatted_textObject

Outputs formatted howitzer settings


61
62
63
# File 'lib/howitzer/log.rb', line 61

def settings_as_formatted_text
  log_without_formatting { info ::SexySettings::Base.instance.as_formatted_text }
end

#warn(msg) ⇒ Object

Outputs warn message


34
35
36
# File 'lib/howitzer/log.rb', line 34

def warn(msg)
  @logger.warn(msg)
end