本文整理汇总了PHP中OCP\ILogger::critical方法的典型用法代码示例。如果您正苦于以下问题:PHP ILogger::critical方法的具体用法?PHP ILogger::critical怎么用?PHP ILogger::critical使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCP\ILogger
的用法示例。
在下文中一共展示了ILogger::critical方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onException
/**
* Uncaught exception handler
*
* @param \Exception $exception
*/
public static function onException($exception)
{
$class = get_class($exception);
$msg = $exception->getMessage();
$msg = "{$class}: {$msg} at " . $exception->getFile() . '#' . $exception->getLine();
self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
}
示例2: getEncryptionModule
/**
* read encryption module needed to read/write the file located at $path
*
* @param string $path
* @return null|\OCP\Encryption\IEncryptionModule
* @throws ModuleDoesNotExistsException
* @throws \Exception
*/
protected function getEncryptionModule($path) {
$encryptionModule = null;
$header = $this->getHeader($path);
$encryptionModuleId = $this->util->getEncryptionModuleId($header);
if (!empty($encryptionModuleId)) {
try {
$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
} catch (ModuleDoesNotExistsException $e) {
$this->logger->critical('Encryption module defined in "' . $path . '" not loaded!');
throw $e;
}
}
return $encryptionModule;
}
示例3: critical
/**
* @inheritdoc
*/
public function critical($message, array $context = [])
{
$this->logger->critical($message, array_merge($this->context, $context));
}
示例4: critical
/**
* @inheritdoc
*/
public function critical($message, array $context = array())
{
$this->logger->critical($message, $this->context);
}