Access keys

LogSupport

Kind of class: class
Inherits from: BasicClass
Known subclasses:
Version: 2.0
Author: Martin Heidegger
Classpath: org.as2lib.env.log.LogSupport
File last modified: Wednesday, 12 October 2005, 17:29:28
LogSupport can be used to easily gain access to loggers.

You may extend this class to be able to access the logger appropriate to
your specific class with the getter property logger or the getLogger
method.

Example:

class MyClass extends LogSupport {

  public function test() {
    logger.info("hi");
  }

}

Summary

Constructor
Instance properties
Instance methods
Instance methods inherited from BasicClass

Constructor

LogSupport

function LogSupport (
Void)
Constructs a new LogSupport instance.

Instance properties

logger

logger:Logger
(read,write)
The logger for your sub-class.

Class methods

getLoggerByClass

static function getLoggerByClass (
clazz:Function) : Logger
Returns the logger for the given clazz.
Parameters:
clazz:
the clazz to return a logger for
Returns:
the logger corresponding to the given clazz

getLoggerByInstance

static function getLoggerByInstance (
instance) : Logger
Return the logger for the given instance.
Parameters:
instance:
the instance to return a logger for
Returns:
the logger corresponding to the given instance

getLoggerByScope

static function getLoggerByScope (
scope) : Logger
Returns the logger for the given scope.
Parameters:
scope:
the scope to return a logger for
Returns:
the logger corresponding to the given scope

Instance methods

getLogger

function getLogger (
Void) : Logger
Returns the logger for this instance.
Returns:
the logger corresponding to this instance