Пример #1
0
 /**
  * Returns the module-specific logger, initializing it if required.
  *
  * @return Tlog a Tlog instance
  */
 public function getLogger()
 {
     if ($this->log == null) {
         $this->log = Tlog::getNewInstance();
         $logFilePath = $this->getLogFilePath();
         $this->log->setPrefix("#LEVEL: #DATE #HOUR: ");
         $this->log->setDestinations("\\Thelia\\Log\\Destination\\TlogDestinationFile");
         $this->log->setConfig("\\Thelia\\Log\\Destination\\TlogDestinationFile", 0, $logFilePath);
     }
     return $this->log;
 }
Пример #2
0
 public function __construct()
 {
     $this->logger = Tlog::getNewInstance();
     $this->logger->setDestinations(static::LOG_CLASS);
     $this->logger->setConfig(self::LOG_CLASS, 0, THELIA_ROOT . "log" . DS . "log-shopping-flux.txt");
     /**
      * Create a fake user ShoppingFlux if it doesn't exist
      */
     $this->shoppingFluxCustomer = ShoppingFluxConfigQuery::createShoppingFluxCustomer();
     $this->shoppingFluxPaymentModule = (new ShoppingFlux())->getModuleModel();
     $this->shoppingFluxPaymentModuleId = $this->shoppingFluxPaymentModule->getId();
 }
Пример #3
0
 protected function getBackToPreviousState()
 {
     $this->log->setDestinations("\\Thelia\\Log\\Destination\\TlogDestinationRotatingFile");
 }