lib/kryten/lawger.rb in kryten-0.3.1 vs lib/kryten/lawger.rb in kryten-0.3.2
- old
+ new
@@ -1,9 +1,13 @@
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)