PHP code example of aaronheath / class-logger
1. Go to this page and download the library: Download aaronheath/class-logger 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/ */
aaronheath / class-logger example snippets
$this->log(); // alias for $this->logDebug()
$this->logEmergency();
$this->logAlert();
$this->logCritical();
$this->logError();
$this->logWarning();
$this->logNotice();
$this->logInfo();
$this->logDebug();
namespace App\Support;
use Heath\ClassLogger\ClassLogger;
class Example
{
use ClassLogger;
public function doSomething()
{
...
$this->log('something done');
$this->log('also with array of data', ['aaa' => 'bbb']);
...
}
}