Class org.as2lib.env.log.LogSupport

Description

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"); } }

Field Index

logger

Method Index

new LogSupport()
getLogger(), getLoggerByClass(), getLoggerByInstance(), getLoggerByScope()

Inherited from BasicClass

Constructor Detail

LogSupport

public function LogSupport(Void)

Constructs a new LogSupport instance.

Field Detail

logger

public logger:Logger
The logger for your sub-class.

Method Detail

getLoggerByScope

static public function getLoggerByScope(scope):Logger

Returns the logger for the given scope.

Parameters

scopethe scope to return a logger for

Return

the logger corresponding to the given scope

getLoggerByInstance

static public function getLoggerByInstance(instance):Logger

Return the logger for the given instance.

Parameters

instancethe instance to return a logger for

Return

the logger corresponding to the given instance

getLoggerByClass

static public function getLoggerByClass(clazz:Function):Logger

Returns the logger for the given clazz.

Parameters

clazzthe clazz to return a logger for

Return

the logger corresponding to the given clazz

getLogger

public function getLogger(Void):Logger

Returns the logger for this instance.

Return

the logger corresponding to this instance