1. Go to this page and download the library: Download ssch/t3-psr3-log-processor library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ssch / t3-psr3-log-processor example snippets
use Psr\Log\LogLevel;use TYPO3\CMS\Core\Log\LogRecord;
$logRecord = new LogRecord('foo', LogLevel::INFO, 'A message with a {placeholder}', ['placeholder' => 'bar']);
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Documentation']['Examples']['Controller']['processorConfiguration'] = [
// configuration for Debug level log entries and above
\TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
\Ssch\Psr3LogProcessor\Processor\PsrLogMessageProcessor::class => [
// The format of the timestamp: one supported by DateTime::format
'dateFormat' => DateTime::ISO8601,
// If set to true the fields interpolated into message gets unset
'removeUsedContextFields' => true,
// Arrays will be json encoded. With this option you can define how this will happen
'jsonFlags' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
]
]
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.