module Tailor::Logger::Mixin
Provides an .included hook to insert the name of the class for each log message in the class that includes the Mixin
.
Public Class Methods
included(_)
click to toggle source
# File lib/tailor/logger.rb, line 23 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 end