定制 nhattuanbl/syslog 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

nhattuanbl/syslog

最新稳定版本:1.8

Composer 安装命令:

composer require nhattuanbl/syslog

包简介

Laravel model & request logging

README 文档

README

Package designed to enhance Laravel application's logging capabilities. It offers a robust solution for tracking and logging various model and application events.

  • Model Logging
  • Request Logging
  • Support MongoDB

Installation

composer require nhattuanbl/syslog

Important: With version 5.4 or below, you must register your service providers manually in the providers section of the config/app.php configuration file in your laravel project.

'providers' => [
    // Other Service Providers

    nhattuanbl\SyslogServiceProvider::class,
],

Publish config file

php artisan vendor:publish --provider="nhattuanbl\Syslog\SyslogServiceProvider" --tag="config"

Publish migration file

php artisan vendor:publish --provider="nhattuanbl\Syslog\SyslogServiceProvider" --tag="migration"
php artisan migrate

Usage

Tracking Model Events

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use nhattuanbl\Syslog\Traits\SyslogTrait;

class Product extends Model
{
    use SyslogTrait;
    ....
    

Custom log

use nhattuanbl\Syslog\Models\Syslog;

Syslog::log('auth', 'someone login', 'login', null, null, ['ip' => $request->ip()]);

统计信息

  • 总下载量: 88
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-08