PHP code example of aseemann / php-livelog

1. Go to this page and download the library: Download aseemann/php-livelog 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/ */

    

aseemann / php-livelog example snippets



$logger = new \ASeemann\PhpLiveLog\Logger('Application Name', 'LoggerName');

$logger->info('A small info massage');

$logger->notice('Some notice', ['data' => 'data for notice']);


$GLOBALS['TYPO3_CONF_VARS']['FE']['debug'] = true;
$GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] = true;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['enable_DLOG'] = true,
$GLOBALS['TYPO3_CONF_VARS']['SYS']['enable_errorDLOG'] = true,
$GLOBALS['TYPO3_CONF_VARS']['SYS']['enable_exceptionDLOG'] = true,
$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = 0,

if (false === is_array($GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG])) {
    $GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG] = [];
}

$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG]
[\ASeemann\PhpLiveLog\Connector\TYPO3\LogWriter::class] = [
];

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'] = [];
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'][]
    = \ASeemann\PhpLiveLog\Connector\TYPO3\DevLogger::class . "->devLogger";

$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG]
[\ASeemann\PhpLiveLog\Connector\TYPO3\LogWriter::class] = [
    'ignorePattern' => '.*Frontend.*'
];
`json
{
    "scripts": {
        "set-symlinks": [
            "ln -sfT ../vendor/aseemann/php-livelog/web docroot/livelog"
        ],
        "post-install-cmd": [
            "@set-symlinks"
        ],
        "post-update-cmd": [
            "@set-symlinks"
        ]
    }
}