PHP code example of digicademy / typo3-sentry-logs-writer

1. Go to this page and download the library: Download digicademy/typo3-sentry-logs-writer 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/ */

    

digicademy / typo3-sentry-logs-writer example snippets


use Digicademy\Typo3SentryLogsWriter\Log\Writer\SentryLogsWriter;
use Psr\Log\LogLevel;

foreach ([
    LogLevel::INFO,
    LogLevel::NOTICE,
    LogLevel::WARNING,
    LogLevel::ERROR,
    LogLevel::CRITICAL,
    LogLevel::ALERT,
    LogLevel::EMERGENCY,
] as $level) {
    $GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][$level][SentryLogsWriter::class] = [];
}