コード例 #1
0
ファイル: service.log.php プロジェクト: Andyyang1981/pi
<?php

// Log service configuration
/**
 * Environments: production, debug, development
 */
$config = array();
// Development environment
$config['development'] = array('ip' => array(), 'logger' => array('active' => true, 'writer' => array('audit' => array('role' => array(), 'user' => array(), 'ip' => array(), 'method' => array('POST')))), 'debugger' => array('active' => true), 'error_handler' => array('active' => true, 'error_reporting' => -1, 'error_level' => 'development'), 'exception_handler' => array('active' => true), 'profiler' => array('active' => true), 'db_profiler' => array('active' => true));
// Debug environment
$config['debug'] = $config['development'];
$config['debug']['error_handler']['error_reporting'] = E_ALL & ~(E_DEPRECATED | E_USER_DEPRECATED | E_NOTICE);
$config['debug']['error_handler']['error_level'] = 'debug';
// Close environment
$config['close'] = $config['development'];
$config['close']['error_handler']['error_reporting'] = E_ALL;
$config['close']['ip'] = array('127.0.0.1');
// Production evnvironment
$config['production'] = array('logger' => array('writer' => array('audit' => array('role' => array(), 'user' => array(), 'ip' => array(), 'method' => array('POST')))), 'error_handler' => array('active' => true, 'error_reporting' => E_USER_ERROR), 'exception_handler' => array('active' => true));
return $config[Pi::environment()] ?: $config['production'];