Loggability::

LogClient module

Methods to install for objects which call log_to.

Attributes

log_host_key RW

The key of the log host this client targets

Public Instance Methods

inherited( subclass )

Inheritance hook – set the log host key of subclasses to the same thing as the extended class.

# File lib/loggability/logclient.rb, line 23
def inherited( subclass )
        super
        Loggability.log.debug "Setting up subclass %p of %p to log to %p" %
                [ subclass, self, self.log_host_key ]
        subclass.log_host_key = self.log_host_key
end
log()

Return the Loggability::Logger object associated with the log host the client is logging to. :TODO: Use delegation for efficiency.

# File lib/loggability/logclient.rb, line 16
def log
        @__log ||= Loggability[ self ].proxy_for( self )
end