lib/tailor/logger.rb in tailor-1.3.1 vs lib/tailor/logger.rb in tailor-1.4.0

- old
+ new

@@ -8,20 +8,20 @@ # messages. def self.logger return @logger if @logger @logger ||= ::Logger.new $stdout - def @logger.format_message(level, time, progname, msg) + def @logger.format_message(_, time, _, msg) "[#{time.strftime('%Y-%m-%d %H:%M:%S')}] #{msg}\n" end @logger end # Provides an .included hook to insert the name of the class for each log # message in the class that includes the Mixin. module Mixin - def self.included(base) + def self.included(_) define_method :log do |*args| class_minus_main_name = self.class.to_s.sub(/^.*::/, '') args.first.insert(0, "<#{class_minus_main_name}> ") Tailor::Logger.log(*args) end