Module: LoggingLibrary::LoggerFactory
- Defined in:
- lib/logging_library/logger_factory.rb
Overview
Module responsible for instantiating logger objects.
Class Method Summary collapse
-
.create(name = nil) ⇒ Object
Creates a new
Loggerobject.
Class Method Details
.create(name = nil) ⇒ Object
Creates a new Logger object.
12 13 14 15 |
# File 'lib/logging_library/logger_factory.rb', line 12 def create(name = nil) logger_name = name || caller[0][/`.*'/][1..-2] Logger.new(logger_name) end |