Esempio n. 1
0
 /**
  * Initializes Insulin Lib with custom logger manager and custom timedate
  * class.
  */
 protected function _initInsulinLib()
 {
     require_once 'Insulin/Exception.php';
     global $log;
     require_once 'Insulin/Logger/Manager.php';
     $log = Insulin_Logger_Manager::getLogger();
     global $timedate;
     require_once 'Insulin/Utils/DateTime.php';
     $timedate = Insulin_Utils_DateTime::getInstance();
 }
Esempio n. 2
0
 public static function getLogger()
 {
     if (!isset(self::$_instance)) {
         $c = __CLASS__;
         self::$_instance = new $c();
         self::$_sugarLoggerManager = LoggerManager::getLogger();
         // init loggers
         $loggers = LoggerManager::getAvailableLoggers();
         foreach ($loggers as $logger) {
             $loggers[$logger] = null;
         }
         self::$_loggers = $loggers;
     }
     return self::$_instance;
 }