Sha256: a177adfb7698963d771f426e720abc17b05a092c798f9a0f116944ca1041e036
Contents?: true
Size: 470 Bytes
Versions: 6
Compression:
Stored size: 470 Bytes
Contents
require 'logger' module Kryten::Lawger attr_accessor :logger def name @name || self.class.to_s.gsub('::','-').downcase end def log_path "log/#{name}.log" end def log(level = :debug, message) default_log_format logger.progname = name logger.send(level, message ) end def logger unless @logger @logger = Logger.new(log_path) default_log_format end @logger end def default_log_format nil end end
Version data entries
6 entries across 6 versions & 1 rubygems