public static function getLogger(target:Object):ILogger
Returns the logger associated with the specified class.
You can pass class, instance or category as string.
Parameters
| target:Object — The class, instance or category of the logger that
should be returned.
|
Returns
| ILogger — An instance of a logger object for the specified name.
If the name doesn't exist, a new instance with the specified
name is returned.
|
Example
Usage A:
package com.theriabook.tests
{
import com.theriabook.util.logging.LogUtils;
import mx.logging.ILogger;
public class TestClass
{
private static const aLogger:ILogger =
LogUtils.getLogger (TestClass);
...
}
}
Usage B:
package com.theriabook.tests
{
import com.theriabook.util.logging.LogUtils;
import mx.logging.ILogger;
public class TestClass
{
private var aLogger:ILogger = LogUtils.getLogger (this);
...
}
}
Usage C:
package com.theriabook.tests
{
import com.theriabook.util.logging.LogUtils;
import mx.logging.ILogger;
public class TestClass
{
private static const aLogger:ILogger =
LogUtils.getLogger ("com.theriabook.tests.TestClass");
...
}
}