Sha256: 38013a4414a82c4a4307c9eea6dbc4a229d4ef7a8333422ca43ef4819cd7b844

Contents?: true

Size: 525 Bytes

Versions: 3

Compression:

Stored size: 525 Bytes

Contents

require 'innate/log/hub'
require 'innate/log/color_formatter'

module Innate
  logdev, *params = options.log.params
  color = options.log.color
  color = Logger::ColorFormatter.color?(logdev) if color.nil?

  logger = Logger.new(logdev, *params)

  if color
    begin
      require 'win32console' if RUBY_PLATFORM =~ /win32/i

      logger.formatter = Logger::ColorFormatter.new

    rescue LoadError
      logger.debug "For colors on windows, please `gem install win32console`"
    end
  end

  Log = LogHub.new(logger)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
manveru-innate-2009.02.06 lib/innate/log.rb
manveru-innate-2009.02.21 lib/innate/log.rb
manveru-innate-2009.02.25 lib/innate/log.rb