Sha256: 32abd63ae917ea11b2fc679dda0c5cd9e8c1e38a63f4cd1d7f8cf1b66698513f
Contents?: true
Size: 526 Bytes
Versions: 11
Compression:
Stored size: 526 Bytes
Contents
require "logger" module App def self.logger @logger end if !defined?(INTENDATIONS) INTENDATIONS = { "DEBUG" => ' ', "INFO" => ' **', "WARN" => ' ****', "ERROR" => ' ******', "FATAL" => '********' } end def self.logger=(logger) logger.formatter = proc do |severity, datetime, progname, msg| intend = INTENDATIONS[severity] || INTENDATIONS["FATAL"] "#{intend} #{msg}\n" end @logger = logger end end App.logger = Logger.new(STDERR)
Version data entries
11 entries across 11 versions & 1 rubygems