本文整理匯總了PHP中Piwik\Log::getMonologLevel方法的典型用法代碼示例。如果您正苦於以下問題:PHP Log::getMonologLevel方法的具體用法?PHP Log::getMonologLevel怎麽用?PHP Log::getMonologLevel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Piwik\Log
的用法示例。
在下文中一共展示了Log::getMonologLevel方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
return array();
}
$classes = $c->get('log.handler.classes');
$writerNames = array_map('trim', $writerNames);
$writers = array();
foreach ($writerNames as $writerName) {
if (isset($classes[$writerName])) {
$writers[$writerName] = $c->get($classes[$writerName]);
}
}
return array_values($writers);
}), 'log.processors' => array(DI\get('Piwik\\Plugins\\Monolog\\Processor\\SprintfProcessor'), DI\get('Piwik\\Plugins\\Monolog\\Processor\\ClassNameProcessor'), DI\get('Piwik\\Plugins\\Monolog\\Processor\\RequestIdProcessor'), DI\get('Piwik\\Plugins\\Monolog\\Processor\\ExceptionToTextProcessor'), DI\get('Monolog\\Processor\\PsrLogMessageProcessor'), DI\get('Piwik\\Plugins\\Monolog\\Processor\\TokenProcessor')), 'Piwik\\Plugins\\Monolog\\Handler\\FileHandler' => DI\object()->constructor(DI\get('log.file.filename'), DI\get('log.level'))->method('setFormatter', DI\get('log.lineMessageFormatter.file')), 'log.lineMessageFormatter.file' => DI\object('Piwik\\Plugins\\Monolog\\Formatter\\LineMessageFormatter')->constructorParameter('allowInlineLineBreaks', false), 'Piwik\\Plugins\\Monolog\\Handler\\DatabaseHandler' => DI\object()->constructor(DI\get('log.level'))->method('setFormatter', DI\get('Piwik\\Plugins\\Monolog\\Formatter\\LineMessageFormatter')), 'Piwik\\Plugins\\Monolog\\Handler\\WebNotificationHandler' => DI\object()->constructor(DI\get('log.level'))->method('setFormatter', DI\get('Piwik\\Plugins\\Monolog\\Formatter\\LineMessageFormatter')), 'log.level' => DI\factory(function (ContainerInterface $c) {
if ($c->has('ini.log.log_level')) {
$level = strtoupper($c->get('ini.log.log_level'));
if (!empty($level) && defined('Piwik\\Log::' . strtoupper($level))) {
return Log::getMonologLevel(constant('Piwik\\Log::' . strtoupper($level)));
}
}
return Logger::WARNING;
}), 'log.file.filename' => DI\factory(function (ContainerInterface $c) {
$logPath = $c->get('ini.log.logger_file_path');
// Absolute path
if (strpos($logPath, '/') === 0) {
return $logPath;
}
// Remove 'tmp/' at the beginning
if (strpos($logPath, 'tmp/') === 0) {
$logPath = substr($logPath, strlen('tmp'));
}
if (empty($logPath)) {
// Default log file