PHP code example of netleak / log-control
1. Go to this page and download the library: Download netleak/log-control 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/ */
netleak / log-control example snippets
public function createComponentLogs(string $name): void {
$logs = new LogsControl(__DIR__ . '/../../../', '/'); // cesta k rootu aplikace, '/' je automatický prefix veřejné cesty k assetům
// pokud chcete zakázat zobrazení logu warning.log a error.log
// stačí přidat název souboru
// zbytek ze složky s logy je automaticky zobrazen
$logs->disableLogs('warning', 'error');
$this->addComponent($logs, $name);
}