/** * 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)); } }
/** * 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); } } }