Sha256: 75bb66ef668bee72e01d996919902a467c2649349ba43727c2fdf4318baf6a2f
Contents?: true
Size: 632 Bytes
Versions: 26
Compression:
Stored size: 632 Bytes
Contents
# encoding: UTF-8 module Tetra # configures logging for this application class Logger include Singleton extend Forwardable def_delegators :@logger, :debug, :info, :warn, :error, :fatal, :level= def initialize @logger = ::Logger.new(STDERR) @logger.datetime_format = "%Y-%m-%d %H:%M " @logger.level = ::Logger::ERROR @logger.formatter = proc do |severity, _datetime, _progname, msg| "#{severity.chars.first}: #{msg}\n" end end end # convenience methods module Logging # convenience instance method def log Tetra::Logger.instance end end end
Version data entries
26 entries across 26 versions & 1 rubygems