Sha256: 09276e5586e88e0a6b6214caca7425fddae264d514cc182b238b1cc96fe0307d
Contents?: true
Size: 808 Bytes
Versions: 1
Compression:
Stored size: 808 Bytes
Contents
require 'cheripic/cmd' require 'cheripic/version' # set up a golbal logger object to access across module require 'yell' module Cheripic # custom error handling class CheripicError < StandardError; end class CheripicIOError < CheripicError; end class CheripicArgError < CheripicError; end # Define a logger and pass `Object` as name. # Yell adds this logger to the repository where you can access it later on. format = Yell::Formatter.new('[%5L] %d : %m', '%Y-%m-%d %H:%M:%S') Yell.new(:format => format) do |l| l.level = :info l.name = Object l.adapter STDOUT, level: [:debug, :info, :warn] l.adapter STDERR, level: [:error, :fatal] end # Enable logging for the class that (almost) every Ruby class inherits from Object.send :include, Yell::Loggable end # Cheripic
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cheripic-0.1.0 | lib/cheripic.rb |