Class: Toys::Utils::StandardUI::VerbosityLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/toys/utils/standard_ui.rb

Overview

The logger class created by #create_logger. It is a standard Logger that also has a verbosity attribute, which the Runner sets to the verbosity of the run, as described in Runner. The formatter installed by #create_logger uses it to choose a format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, **kwargs) ⇒ VerbosityLogger

Create a logger. Takes the same arguments as the standard Logger. The verbosity is initially zero.



33
34
35
36
# File 'lib/toys/utils/standard_ui.rb', line 33

def initialize(*args, **kwargs)
  super
  @verbosity = 0
end

Instance Attribute Details

#verbosity ⇒ Integer

The verbosity of the current run, or zero if not running.

Returns:

  • (Integer)


43
44
45
# File 'lib/toys/utils/standard_ui.rb', line 43

def verbosity
  @verbosity
end