本文整理汇总了PHP中Logging::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::initialize方法的具体用法?PHP Logging::initialize怎么用?PHP Logging::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging::initialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBackend
protected function getBackend()
{
Logging::initialize(self::$CONFIGURATION, "Test");
$this->responseHandler = new TestResponseHandler();
$db = PDODatabase::createFromObj(self::$pdo, "sqlite");
$settings = new Settings(self::$CONFIGURATION);
$backend = new MollifyBackend($settings, $db, $this->responseHandler);
//$backend->processRequest(new Request());
return $backend;
}
示例2: __construct
public function __construct($pageRoot, $type, $settingsVar)
{
$this->pageRoot = $pageRoot;
$this->type = $type;
$this->settingsVar = $settingsVar;
foreach ($_POST as $key => $val) {
$this->data[$key] = $val;
}
require_once "include/Logging.class.php";
Logging::initialize($this->settingsVar);
Logging::logDebug("Installer: " . get_class($this));
}
示例3: __construct
public function __construct($conf)
{
require_once "include/Settings.class.php";
require_once "include/session/Session.class.php";
require_once "include/ServiceEnvironment.class.php";
require_once "include/Util.class.php";
require_once "db/DBConnectionFactory.class.php";
require_once "include/configuration/ConfigurationDao.class.php";
require_once "include/Logging.class.php";
require_once "include/Version.info.php";
require_once "include/Cookie.class.php";
require_once "include/Features.class.php";
require_once "include/Request.class.php";
Logging::initialize($conf);
$this->settings = new Settings($conf);
$this->session = new Session(TRUE);
$f = new DBConnectionFactory();
$db = $f->createConnection($this->settings);
$this->configuration = new ConfigurationDao($db);
$this->env = new ServiceEnvironment($db, $this->session, new VoidResponseHandler(), $this->configuration, $this->settings);
$this->env->initialize(Request::get(TRUE));
$this->authentication = $this->env->authentication();
}
示例4: set_exception_handler
$responseHandler->unknownServerError($e->getMessage());
die;
}
set_exception_handler('globalExceptionHandler');
/*function fatalErrorHandler() {
global $responseHandler;
$info = "PHP fatal error: ".Util::array2str(error_get_last());
Logging::logError($info);
if ($responseHandler == NULL) $responseHandler = new ResponseHandler(new OutputHandler());
$responseHandler->unknownServerError($info);
die();
}
register_shutdown_function("fatalErrorHandler");*/
require_once "configuration.php";
global $CONFIGURATION, $VERSION;
Logging::initialize($CONFIGURATION, $VERSION);
require_once "include/MollifyBackend.class.php";
require_once "include/Settings.class.php";
$responseHandler = new ResponseHandler(new OutputHandler(getSetting($CONFIGURATION, 'mime_types', array()), isSetting($CONFIGURATION, 'support_output_buffer')));
try {
$settings = new Settings($CONFIGURATION);
$backend = new MollifyBackend($settings, getDB($settings), $responseHandler);
$backend->processRequest(new Request());
} catch (ServiceException $e) {
Logging::logException($e);
$responseHandler->error($e->type(), $e->details(), $e->data());
} catch (Exception $e) {
Logging::logException($e);
$responseHandler->unknownServerError($e->getMessage());
}
function getDB($settings)