Class: PumaDoctor::Logger
- Inherits:
-
Object
- Object
- PumaDoctor::Logger
- Defined in:
- lib/puma_doctor/logger.rb
Instance Method Summary collapse
- #info(text) ⇒ Object
-
#initialize(options = {}) ⇒ Logger
constructor
A new instance of Logger.
- #log_start ⇒ Object
- #warn(text) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Logger
Returns a new instance of Logger.
5 6 7 8 |
# File 'lib/puma_doctor/logger.rb', line 5 def initialize( = {}) @logger = ::Logger.new([:log_file]) @logger.level = [:log_level] || ::Logger::INFO end |
Instance Method Details
#info(text) ⇒ Object
10 11 12 |
# File 'lib/puma_doctor/logger.rb', line 10 def info(text) @logger.info(text) end |
#log_start ⇒ Object
18 19 20 |
# File 'lib/puma_doctor/logger.rb', line 18 def log_start @logger.info "[Puma Doctor] Starting..." end |
#warn(text) ⇒ Object
14 15 16 |
# File 'lib/puma_doctor/logger.rb', line 14 def warn(text) @logger.warn(text) end |