Methods to install for objects which call log_to.
The key of the log host this client targets
Inheritance hook – set the log host key of subclasses to the same thing as the extended class.
# File lib/loggability.rb, line 255
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
Return the Loggability::Logger object associated with the log host the client is logging to. :TODO: Use delegation for efficiency.
# File lib/loggability.rb, line 248
def log
@__log ||= Loggability[ self ].proxy_for( self )
end