laravel-system-log, Packagist
It is used for working with logging data, recording logs.
To install package, you need run command:
composer require akbsit/laravel-system-log
use Akbsit\SystemLog\SystemLog;
$arData = [
'some_data' => 1
];
SystemLog::write()
->enableSimpleInfo()
->setInfo(['method' => __METHOD__])
->setData(['$arData' => $arData])
->setMessage('Some log message')
->put();
setNameSpace($sNameSpace)
- specifying the read space:$sNameSpace
- name of the space (by defaultdefault
).
enableSimpleInfo()
- enable minimum set of call location logging;setInfo($arInfo)
- specifying information about the logging location:$arInfo
- array data.
setData($arData)
- specifying logging data:$arData
- array data.
setMessage($sMessage)
- specifying the logging message:$sMessage
- message.
setType($sType)
- specifying the logging type:$sType
- type (by defaulterror
).
put()
- create record.
use Akbsit\SystemLog\SystemLog;
$oSystemLog = SystemLog::read()
->setNameSpace(SystemLog::NAMESPACE_API);
setNameSpace($sNameSpace)
- specifying the read space:$sNameSpace
- name of the space.
getSize()
- get the size of logs in space;getAllSize()
- get the size of logs;delete()
- clear logs in space;deleteAll()
- clear logs;getList()
- get a list of logs in the space.