Parcourir la source

centralize logging in ot_core

Olivier Massot il y a 5 ans
Parent
commit
629b3c7233

+ 0 - 19
ot_admin/ext_localconf.php

@@ -1,7 +1,6 @@
 <?php
 defined('TYPO3_MODE') || die();
 
-
 // Because of this issue https://forge.typo3.org/issues/89449,
 // we have to xclass the BackendUserAuthenticator backend middleware
 // to allow routes to be public (but restricted to authorized ips)
@@ -9,21 +8,3 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][TYPO3\CMS\Backend\Middleware\Backe
     'className' => Opentalent\OtAdmin\Middleware\OtBackendUserAuthenticator::class
 ];
 
-
-$GLOBALS['TYPO3_CONF_VARS']['LOG']['Opentalent']['OtAdmin']['writerConfiguration'] = [
-    // configuration for ERROR level log entries
-    TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
-        // add a FileWriter
-        TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
-            // configuration for the writer
-            'logFile' => TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/typo3_otadmin.log'
-        ]
-    ],
-    TYPO3\CMS\Core\Log\LogLevel::WARNING => [
-        // add a DatabaseWriter
-        TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [
-            'logTable' => 'tx_opentalent_log'
-        ]
-    ]
-];
-

+ 25 - 0
ot_core/ext_localconf.php

@@ -0,0 +1,25 @@
+<?php
+
+if (!defined('TYPO3_MODE')) {
+    die('Access denied.');
+}
+
+$GLOBALS['TYPO3_CONF_VARS']['LOG']['Opentalent']['OtCore']['writerConfiguration'] = [
+    // configuration for ERROR level log entries
+    TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
+        // add a FileWriter
+        TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
+            // configuration for the writer
+            'logFile' => TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/ot_typo3.log'
+        ]
+    ],
+    TYPO3\CMS\Core\Log\LogLevel::WARNING => [
+        // add a DatabaseWriter
+        TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [
+            'logTable' => 'tx_opentalent_log'
+        ]
+    ]
+];
+
+
+$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['Controller/NewsController.php']['createDemandObjectFromSettings'] = ['Opentalent\OtTemplating\News\NewsFilter->createDemandObjectFromSettings'];

+ 1 - 1
ot_stats/Resources/Private/Templates/OtStats/ConfirmDeletion.html → ot_stats/Resources/Private/Templates/OtStats/AskForDeactivationConfirmation.html

@@ -15,7 +15,7 @@
 
             <f:link.action
                     action="disableStats"
-                    title="select"
+                    title="disableStats"
                     class="ot-btn"
                     arguments="{rootUid: rootUid}"
             >

+ 0 - 19
ot_templating/ext_localconf.php

@@ -6,7 +6,6 @@ if (!defined('TYPO3_MODE')) {
 
 // ext_localconf.php contient les directives permettant de configurer le frontend
 
-
 \FluidTYPO3\Flux\Core::registerProviderExtensionKey(
     'OpenTalent.OtTemplating',
     'Page'
@@ -16,22 +15,4 @@ if (!defined('TYPO3_MODE')) {
     'Content'
 );
 
-$GLOBALS['TYPO3_CONF_VARS']['LOG']['Opentalent']['OtTemplating']['writerConfiguration'] = [
-    // configuration for ERROR level log entries
-    TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
-        // add a FileWriter
-        TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
-            // configuration for the writer
-            'logFile' => TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/typo3_ottemplating.log'
-        ]
-    ],
-    TYPO3\CMS\Core\Log\LogLevel::WARNING => [
-        // add a DatabaseWriter
-        TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [
-            'logTable' => 'tx_opentalent_log'
-        ]
-    ]
-];
-
-
 $GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['Controller/NewsController.php']['createDemandObjectFromSettings'] = ['Opentalent\OtTemplating\News\NewsFilter->createDemandObjectFromSettings'];