Class: Papermill::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/papermill-agent/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(io_object = 'log/papermill.log') ⇒ Logger

Returns a new instance of Logger.



5
6
7
8
# File 'lib/papermill-agent/logger.rb', line 5

def initialize(io_object = 'log/papermill.log')
  FileUtils.mkdir('log') unless File.exists?('log')
  super(io_object)
end

Instance Method Details

#log_exception(exception) ⇒ Object



10
11
12
# File 'lib/papermill-agent/logger.rb', line 10

def log_exception(exception)
  error(exception.message + exception.backtrace.join("\n"))
end