Attempt at fixing Sentry error logging

This commit is contained in:
Albert Santoni 2015-06-16 14:35:29 -04:00
parent 709b9bbeec
commit 90bd0a1ab4
3 changed files with 9 additions and 5 deletions

View File

@ -100,10 +100,10 @@ try {
echo "<pre>";
echo $e->getTraceAsString();
echo "</pre>";
Logging::info($e->getMessage());
Logging::info($e->getTraceAsString());
Logging::error($e->getMessage());
Logging::error($e->getTraceAsString());
} else {
Logging::info($e->getTrace());
Logging::error($e->getTrace());
}
throw $e;
}

View File

@ -134,7 +134,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
//$r->gotoSimpleAndExit('index', 'login', $request->getModuleName());
//die();
throw new Zend_Controller_Exception("hi", 401);
throw new Zend_Controller_Exception("Incorrect API key", 401);
}
}
else //Non-REST, regular Airtime web app requests

View File

@ -83,7 +83,11 @@ class Logging {
{
$logger = self::getLogger();
$logger->err(self::getLinePrefix(true) . self::toString($p_msg));
SentryLogger::getInstance()->captureError(self::toString($p_msg));
//Escape the % symbols in any of our errors because Sentry chokes (vsprint formatting error).
$msg = self::toString($p_msg);
$msg = str_replace("%", "%%", $msg);
SentryLogger::getInstance()->captureError($msg);
}
public static function debug($p_msg)