Packagecom.theriabook.util.logging
Classpublic class LogUtils

Util class with static service methods for Flex Logging API.



Public Methods
 MethodDefined by
  
getLogger(target:Object):ILogger
[static] Returns the logger associated with the specified class.
LogUtils
Method detail
getLogger()method
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");
     ...
   }
   }