Ejemplo n.º 1
0
 /**
  * Add a message to the module log
  *
  * @param string $log log message
  *
  * @return void
  */
 public function addLog($log)
 {
     if ($this->debug) {
         if (!is_scalar($log)) {
             $log = serialize($log);
         }
         $name = is_object($this->object) ? $this->object->name() : $this->dirname;
         \Xoops::getInstance()->logger()->debug($log, array('channel' => 'Extra', 'name' => $name));
     }
 }
Ejemplo n.º 2
0
 /**
  * Add a message to the module log
  *
  * @param string $log log message
  *
  * @return void
  */
 public function addLog($log)
 {
     if ($this->debug) {
         if (is_object($GLOBALS['xoopsLogger'])) {
             if (!is_scalar($log)) {
                 $log = serialize($log);
             }
             $GLOBALS['xoopsLogger']->addExtra(is_object($this->object) ? $this->object->name() : $this->dirname, $log);
         }
     }
 }