Package Data | |
---|---|
Maintainer Username: | blueant-allan |
Maintainer Contact: | blueant.allan@gmail.com (Allan Atim) |
Package Create Date: | 2021-03-01 |
Package Last Update: | 2021-03-01 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-31 03:06:30 |
Package Statistics | |
---|---|
Total Downloads: | 12 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A package for creating custom logs in Lumen microframework
You can install this package into your Lumen application using composer.
The recommended way to install composer packages is:
composer require blueant-allan/lumen-elasticlogger
use blueantallan\Lumen\ElasticLogger\Logger\BaseLogger;
public function yourMethod()
{
$log = new BaseLogger();
$log->activityInfo('Event Type', 'Write my test log now.');
}
The library will expect the following parameters:
Create an activity information log:
$log = new BaseLogger();
$log->activityInfo('EventType', 'your message');
Create an activity debug log:
$log->activityDebug('EventType', 'your message');
Create an activity Error log:
$log->activityError('EventType', 'your message');
Create an activity Notice log:
$log->activityNotice('EventType', 'your message');
Create an activity Warning log:
$log->activityWarning('EventType', 'your message');
Pass an array to your logs. Example below:
$data = [
'id' => 42,
'name' => 'Mark Tune',
'roles' => ['Admin', 'Support']
];
$log->activityInfo('Login', 'User successfully logged in', $data);