1. Go to this page and download the library: Download travail/log-buffered 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/ */
travail / log-buffered example snippets
use Log\Buffered;
ed(
[
'file' => '/paht/to/myapp.log', // stderr by default
'buffer_size' => 10240, // 5120 bytes by default
]
);
$log->debugf('This is a %s message', 'debug'); // This message never be output
$log->infof('This is an %s message', 'info');
$log->warnf('This is a %s message', 'warn');
$log->critf('This is a %s message', 'crit');
$_SERVER['LM_DEBUG'] = true;
$_SERVER['LM_LOG_LEVEL'] = 'debug';
$log = new Log\Buffered();
$log->debugf('This is a %s message: %s', 'debug');
$log = new Log\Buffered(
[
'debug' => true,
'log_level' => 'debug',
]
);
$log->debugf('This is a %s message: %s', 'debug');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.