akbsit/laravel-system-log
最新稳定版本:1.0.9
Composer 安装命令:
composer require akbsit/laravel-system-log
包简介
Write logs data in app.
README 文档
README
It is used for working with logging data, recording logs.
Install
To install package, you need run command:
composer require akbsit/laravel-system-log
Examples
Recording logs
use Akbsit\SystemLog\SystemLog; $arData = [ 'some_data' => 1 ]; SystemLog::write() ->enableSimpleInfo() ->setInfo(['method' => __METHOD__]) ->setData(['$arData' => $arData]) ->setMessage('Some log message') ->put();
Methods
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.
Reading logs
use Akbsit\SystemLog\SystemLog; $oSystemLog = SystemLog::read() ->setNameSpace(SystemLog::NAMESPACE_API);
Methods
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.
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-17