Sha256: c6e8fa01177b0fef253d007dd36ba6ff0e54c1442f2aa611fb420b9c030b3b12

Contents?: true

Size: 905 Bytes

Versions: 3

Compression:

Stored size: 905 Bytes

Contents

require 'logger'
require 'cairo'
require 'pango'
require 'rsvg2'
require_relative 'squib/version'
require_relative 'squib/commands/cli'
require_relative 'squib/deck'
require_relative 'squib/card'

module Squib

  # Access the internal logger that Squib uses. By default, Squib configure the logger to the WARN level
  # Use this to suppress or increase output levels.
  # @example
  #   Squib.logger.level = Logger::DEBUG #show waaaay more information than you probably need, unless you're a dev
  #   Squib.logger.level = Logger::ERROR #basically turns it off
  #
  # @return [Logger] the ruby logger
  # @api public
  def logger
    if @logger.nil?
      @logger = Logger.new($stdout)
      @logger.level = Logger::WARN
      @logger.formatter = proc do |severity, datetime, m_progname, msg|
        "#{datetime} #{severity}: #{msg}\n"
      end
    end
    @logger
  end
  module_function :logger

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
squib-0.15.2 lib/squib.rb
squib-0.15.1 lib/squib.rb
squib-0.14.2 lib/squib.rb