PHP code example of blueant-allan / lumen-elasticlogger

1. Go to this page and download the library: Download blueant-allan/lumen-elasticlogger 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/ */

    

blueant-allan / lumen-elasticlogger example snippets


use blueantallan\Lumen\ElasticLogger\Logger\BaseLogger;

public function yourMethod()
{    
    $log = new BaseLogger();
    $log->activityInfo('Event Type', 'Write my test log now.');
}

$log = new BaseLogger();

$log->activityInfo('EventType', 'your message');

$log->activityDebug('EventType', 'your message');

$log->activityError('EventType', 'your message');

$log->activityNotice('EventType', 'your message');

$log->activityWarning('EventType', 'your message');

$data = [
    'id' => 42,
    'name' => 'Mark Tune',
    'roles' => ['Admin', 'Support']
];

$log->activityInfo('Login', 'User successfully logged in', $data);