/** * Brief Description. * Complete Description. * * @param $error (tipo) desc * @param $conf (tipo) desc * * @returns (tipo) desc * */ public function logError($error, $conf = 'maestro') { if ($this->level == 0) { return; } // data/hora no formato "dd/mes/aaaa:hh:mm:ss" $context['dts'] = Manager::getSysTime(); $context['ip'] = sprintf("%15s", $this->host); $login = Manager::getLogin(); $context['uid'] = sprintf("%-10s", $login ? $login->getLogin() : ''); $message = $this->interpolate("[{dts}] {ip} - {uid} : \"{$error}\"", $context); $logfile = $this->getLogFileName($conf . '-error'); //error_log($message . "\n", 3, $logfile); //$this->logMessage('[ERROR]' . $message); $handler = $this->pushHandler(new StreamHandler($logfile, Logger::ERROR)); $this->addError($message); }