Class: SitePrism::Logger Private

Inherits:
Object
  • Object
show all
Defined in:
lib/site_prism/logger.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#create(output = $stdout) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
13
14
15
16
17
18
19
# File 'lib/site_prism/logger.rb', line 10

def create(output = $stdout)
  logger = ::Logger.new(output)
  logger.progname = 'SitePrism'
  logger.level = :UNKNOWN
  logger.formatter = proc do |severity, time, progname, msg|
    "#{time.strftime('%F %T')} - #{severity} - #{progname} - #{msg}\n"
  end

  logger
end