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
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-08