Sha256: 6af6a9717d6ab1a18dba6da89f7b421709e04c3b4534561229cffdcc3f18d23c
Contents?: true
Size: 550 Bytes
Versions: 20
Compression:
Stored size: 550 Bytes
Contents
require 'active_support/tagged_logging' module Services class Logger def initialize unless Services.configuration.log_dir.nil? log_file = File.join(Services.configuration.log_dir, 'services.log') @logger = ActiveSupport::TaggedLogging.new(::Logger.new(log_file)) @logger.clear_tags! end end def log(tags, message, severity = :info) unless @logger.nil? @logger.tagged Time.now, severity.upcase, *tags do @logger.send severity, message end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems