akbsit/laravel-system-log 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 default default).
  • 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 default error).
  • 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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-17