module Loggability::LogHost

Extension for 'log hosts'. A log host is an object that hosts a Loggability::Logger object, and is typically the top of some kind of hierarchy, like a namespace module for a project:

module MyProject

end

This module isn't mean to be used directly – it's installed via the Loggability#log_as declaration, which also does some other initialization that you'll likely want.

Attributes

default_logger[RW]

The logger that will be used when the logging subsystem is reset

log[R]

The logger that's currently in effect

log_host_key[RW]

The key associated with the logger for this host

logger[R]

The logger that's currently in effect

Public Instance Methods

inherited( subclass ) click to toggle source

Register subclasses of log hosts as their own log hosts.

Calls superclass method
# File lib/loggability/loghost.rb, line 39
def inherited( subclass )
        super
        Loggability.register_loghost( subclass )
end
log=( newlogger )
Alias for: logger=
logger=( newlogger ) click to toggle source

Set the logger associated with the LogHost to newlogger. If newlogger isn't a Loggability::Logger, it will be converted to one.

# File lib/loggability/loghost.rb, line 32
def logger=( newlogger )
        @logger = Loggability::Logger( newlogger )
end
Also aliased as: log=