Class: LicenseFinder::Logger
- Inherits:
-
Object
- Object
- LicenseFinder::Logger
- Defined in:
- lib/license_finder/logger.rb
Constant Summary collapse
- MODE_QUIET =
:quiet
- MODE_INFO =
:info
- MODE_DEBUG =
:debug
Instance Attribute Summary collapse
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
Instance Method Summary collapse
-
#initialize(mode = nil) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(mode = nil) ⇒ Logger
Returns a new instance of Logger.
13 14 15 16 17 18 19 20 |
# File 'lib/license_finder/logger.rb', line 13 def initialize(mode = nil) @system_logger = ::Logger.new($stdout) @system_logger.formatter = proc do |_, _, _, msg| "#{msg}\n" end self.mode = mode || MODE_INFO end |
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode.
11 12 13 |
# File 'lib/license_finder/logger.rb', line 11 def mode @mode end |