/** * Get the default log file fall-back when no file is explicitly specified. * @param string $file * @return string */ public function getFallbackFile($file) { if (empty($file)) { $file = $this->_config->getSystemLogFile(); } return empty($file) ? static::DEFAULT_LOG_FILE : $file; }
/** * Write exception to log * * @param Exception $e * @param array $context * @return self | null */ public function logException(Exception $e, array $context = []) { if ($this->_isNotLoggableException()) { return; } $file = $this->_config->getExceptionLogFile(); $context['exception'] = $e; $this->log($e->getMessage(), Zend_Log::ERR, $file, false, $context); return $this; }