class Testable::Logger

Public Instance Methods

create(output = $stdout) click to toggle source

Creates a logger instance with a predefined set of configuration options. This logger instance will be available to any portion of tests that are using the framework.

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

  logger
end