Attempt at fixing Sentry error logging
This commit is contained in:
parent
709b9bbeec
commit
90bd0a1ab4
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue