Added simple error/exception handler and logging
This commit is contained in:
parent
58c565417e
commit
a4b33b97d9
4 changed files with 109 additions and 6 deletions
|
|
@ -8,6 +8,9 @@
|
|||
*/
|
||||
|
||||
// Let PHP take a guess as to the default timezone, if the user hasn't set one:
|
||||
use PHPCI\Logging\Handler;
|
||||
use PHPCI\Logging\LoggerConfig;
|
||||
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
// Set up a basic autoloader for PHPCI:
|
||||
|
|
@ -37,10 +40,12 @@ if (!file_exists(dirname(__FILE__) . '/vendor/autoload.php') && defined('PHPCI_I
|
|||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
// Load Composer autoloader:
|
||||
require_once(dirname(__FILE__) . '/vendor/autoload.php');
|
||||
|
||||
$loggerConfig = LoggerConfig::newFromFile(__DIR__ . "/loggerconfig.php");
|
||||
Handler::register($loggerConfig->getFor('Exceptions'));
|
||||
|
||||
// Load configuration if present:
|
||||
$conf = array();
|
||||
$conf['b8']['app']['namespace'] = 'PHPCI';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue