forked from networkteam/sentry_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
34 lines (29 loc) · 1.38 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
defined('TYPO3') or die();
call_user_func(function() {
if (!\TYPO3\CMS\Core\Core\Environment::isComposerMode()) {
$autoloadFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('sentry_client') . 'vendor/autoload.php';
require_once($autoloadFile);
}
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Frontend\ContentObject\Exception\ProductionExceptionHandler::class] = [
'className' => \Networkteam\SentryClient\Content\ProductionExceptionHandler::class
];
$sentryLogWriterLevel = \Networkteam\SentryClient\Service\ConfigurationService::getLogWriterLevel();
if (!empty($sentryLogWriterLevel)) {
$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = [
$sentryLogWriterLevel => [
\Networkteam\SentryClient\SentryLogWriter::class => [],
],
];
}
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getNumericTypo3Version(), '11', '<')) {
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
$iconRegistry->registerIcon(
'tx-sentryclient-sentry-glyph-light',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:sentry_client/Resources/Public/Icons/sentry-glyph-light.svg']
);
}
});