Sha256: 8a59c0412cd96f2c676711eebdc77a3e2cc2a0a5b4f0f2f05a367901c8c6f3df

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 KB

Contents

# -*- ruby -*-
#encoding: utf-8

require 'loggability' unless defined?( Loggability )

# Extension for 'log hosts'. A <b>log host</b> 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.
#
#
module Loggability::LogHost

	# The logger that will be used when the logging subsystem is reset
	attr_accessor :default_logger

	# The logger that's currently in effect
	attr_reader :logger
	alias_method :log, :logger

	# The key associated with the logger for this host
	attr_accessor :log_host_key


	### Set the logger associated with the LogHost to +newlogger+. If +newlogger+ isn't a
	### Loggability::Logger, it will be converted to one.
	def logger=( newlogger )
		@logger = Loggability::Logger( newlogger )
	end
	alias_method :log=, :logger=

end # module Loggability::LogHost


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
loggability-0.10.1 lib/loggability/loghost.rb
loggability-0.10.0 lib/loggability/loghost.rb
loggability-0.9.0 lib/loggability/loghost.rb
loggability-0.9.0.pre.73 lib/loggability/loghost.rb
loggability-0.8.1 lib/loggability/loghost.rb
loggability-0.8.0 lib/loggability/loghost.rb
loggability-0.8.0.pre.65 lib/loggability/loghost.rb