protected function log($l) { \Journal::write($l); }
public static function error($errorType, $errorContent, $errorFile = NULL, $errorLine = NULL, $errorContext = NULL) { $typeText = 'Unknown error'; switch ($errorType) { case E_USER_ERROR: $typeText = 'Fatal error'; break; case E_USER_WARNING: $typeText = 'Warning'; break; case E_USER_NOTICE: $typeText = 'Notice'; break; default: $typeText = $errorType; break; } if (self::$mode == 'DEVELOPMENT') { // @TODO handling context self::display($typeText, $errorContent, $errorFile, $errorLine, NULL); } else { if (LOG) { $time = date('H:i:s'); if ($errorFile === NULL) { Journal::write('[' . $time . '] ' . $typeText . ' : ' . $errorContent); } else { Journal::write('[' . $time . '] ' . $typeText . ' : ' . $errorContent . ' | (in File ' . $errorFile . ' , Line : ' . $errorLine . ')'); } } else { if (is_callable(self::$production_error_handler)) { self::$production_error_handler(); } } } }