ext_localconf.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. defined('TYPO3_MODE') || die();
  3. use TYPO3\CMS\Core\Core\Environment;
  4. use TYPO3\CMS\Core\Log\LogLevel;
  5. use TYPO3\CMS\Core\Log\Writer\DatabaseWriter;
  6. use TYPO3\CMS\Core\Log\Writer\FileWriter;
  7. // Because of this issue https://forge.typo3.org/issues/89449,
  8. // we have to xclass the BackendUserAuthenticator backend middleware
  9. // to allow routes to be public (but restricted to authorized ips)
  10. $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][TYPO3\CMS\Backend\Middleware\BackendUserAuthenticator::class] = [
  11. 'className' => Opentalent\OtAdmin\Middleware\OtBackendUserAuthenticator::class
  12. ];
  13. $GLOBALS['TYPO3_CONF_VARS']['LOG']['Opentalent']['OtAdmin']['writerConfiguration'] = [
  14. // configuration for ERROR level log entries
  15. LogLevel::DEBUG => [
  16. // add a FileWriter
  17. FileWriter::class => [
  18. // configuration for the writer
  19. 'logFile' => Environment::getVarPath() . '/log/typo3_otadmin.log'
  20. ]
  21. ],
  22. LogLevel::WARNING => [
  23. // add a DatabaseWriter
  24. DatabaseWriter::class => [
  25. 'logTable' => 'tx_opentalent_log'
  26. ]
  27. ]
  28. ];