Class: Ghostest::Logger

Inherits:
Logger
  • Object
show all
Includes:
Singleton
Defined in:
lib/ghostest/logger.rb

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



14
15
16
17
18
19
20
21
22
# File 'lib/ghostest/logger.rb', line 14

def initialize
  super($stdout)

  self.formatter = proc do |_severity, _datetime, _progname, msg|
    "#{msg}\n"
  end

  self.level = Logger::INFO
end

Instance Method Details

#debug=(value) ⇒ Object



28
29
30
# File 'lib/ghostest/logger.rb', line 28

def debug=(value)
  self.level = value ? Logger::DEBUG : Logger::INFO
end

#verboseObject



6
7
8
# File 'lib/ghostest/logger.rb', line 6

def verbose
  @verbose ||= false
end

#verbose=(value) ⇒ Object



10
11
12
# File 'lib/ghostest/logger.rb', line 10

def verbose=(value)
  @verbose = value
end

#verbose_info(msg) ⇒ Object



24
25
26
# File 'lib/ghostest/logger.rb', line 24

def verbose_info(msg)
  info(msg) if verbose
end