Module: RubySmart::SimpleLogger::Extensions::SimpleLog

Included in:
Logger
Defined in:
lib/ruby_smart/simple_logger/extensions/simple_log.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ruby_smart/simple_logger/extensions/simple_log.rb', line 7

def self.included(base)
  base.extend ClassMethods
  base.include InstanceMethods
  base.class_eval do
    # defines the default inspector to be used
    #
    # :auto
    self.inspector = :auto

    # this will overwrite the default log method from the Ruby Logger
    # but makes it still accessible through: #_log
    alias_method :_log, :log
    alias_method :log, :simple_log
  end
end