Closed Zillion01 closed 10 months ago
I also needed this functionality, see my implementation https://github.com/networkteam/sentry_client/pull/87 - feel free to merge, if you find it useful, dear maintainers.
Hey, context based configuration should work now with main branch. Please re-open if something is still wrong
It seems it's not possible to set the logging and debug handling based on context?
When I put in AdditionalConfiguration.php for the isDevelopment context an override like
$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = [ \TYPO3\CMS\Core\Log\LogLevel::ERROR => [ \TYPO3\CMS\Core\Log\Writer\FileWriter::class => [], ], ];
This just gets ignored and still everything is send to Sentry. Easy fix, make an option to set it globally (like now in ext_localconf.php) or set it manually yourself.
Client::captureException(new \Exception($exceptionMessage));
should then still work but send stuf to TYPO3 log / debughandler