Sha256: ba227541105d99ff254169b7dde0e49d2fd1a30ff8e219206900e6cc334c8798

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

require "logger"

module Testable
  class Logger
    # 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.
    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
testable-1.0.0 lib/testable/logger.rb