Sha256: eec62242792ff428e432f7a5e4a907cd79e34c302799f7b2787669daba6ac23a

Contents?: true

Size: 905 Bytes

Versions: 1

Compression:

Stored size: 905 Bytes

Contents

require 'logger'
require 'cairo'
require 'pango'
require 'rsvg2'
require 'squib/version'
require 'squib/commands/new'
require 'squib/deck'
require '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, progname, msg|
        "#{severity} #{progname}: #{msg}\n"
      end
    end
    @logger
  end
  module_function :logger
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
squib-0.0.4 lib/squib.rb