Inversion::Loggable

Add logging to a Inversion class. Including classes get log and log_debug methods.

class MyClass
    include Inversion::Loggable

    def a_method
        self.log.debug "Doing a_method stuff..."
    end
end

Protected Instance Methods

initialize_copy( original ) click to toggle source

Copy constructor -- clear the original's log proxy.

# File lib/inversion/mixins.rb, line 67
def initialize_copy( original )
        @log_proxy = @log_debug_proxy = nil
        super
end
log() click to toggle source

Return the proxied logger.

# File lib/inversion/mixins.rb, line 73
def log
        @log_proxy ||= ClassNameProxy.new( self.class )
end
log_debug() click to toggle source

Return a proxied "debug" logger that ignores other level specification.

# File lib/inversion/mixins.rb, line 78
def log_debug
        @log_debug_proxy ||= ClassNameProxy.new( self.class, true )
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.