Last active
September 28, 2017 20:50
-
-
Save bshaffer/3982788bb35ada1a447430292ffdb965 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Google\Cloud\Logging\LoggingClient; | |
use Google\Cloud\ErrorReporting\Bootstrap; | |
$prev = set_exception_handler(function ($e) { | |
if (!class_exists(LoggingClient::class) || !class_exists(Bootstrap::class)) { | |
// autoload our own libraries | |
require_once('/sys/cloud_logging_autoloader.php'); | |
} | |
$logging = new LoggingClient(); | |
Bootstrap::$psrLogger = $logging->psrLogger(); | |
Bootstrap::exceptionHandler($e); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment