module Treequel::Loggable

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

Protected Instance Methods

initialize_copy( original ) click to toggle source

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

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

Return the proxied logger.

# File lib/treequel/mixins.rb, line 203
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/treequel/mixins.rb, line 208
def log_debug
        @log_debug_proxy ||= ClassNameProxy.new( self.class, true )
end