bushart/logtodatabase 问题修复 & 功能扩展

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

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

bushart/logtodatabase

Composer 安装命令:

composer require bushart/logtodatabase

包简介

A simple modified log to database

README 文档

README

This package provides a custom log for Laravel applications that logs messages to a database table. With this package, you can easily store and query log messages in your application's database.

Installation

To install the package, simply require it using Composer:

composer require bushart/logtodatabase

Next, you should execute the log:db Artisan command

php artisan log:db

After the package is installed, you can run the migration to create the logs table in your database:

php artisan migrate

Usage

To use the custom log, add it to your config/logging.php file:

use bushart\logtodatabase\Log\CustomDatabaseLogger;

'channels' => [
    // ...
      'db' => [
                'driver' => 'custom',
                'via'    => CustomDatabaseLogger::class,
      ],
],

Then, you can log messages to the database:

use Illuminate\Support\Facades\Log;

Log::channel('db')->info('Your message test',['user_id'=>1]);

Log::channel('db')->error('Your error message',['user_id'=>1]);

Log::channel('db')->warning('Your warning message ',['user_id'=>1]);

This will log the message to the logs table in your database.

Support

If you encounter any issues with this package, please open an issue on the GitHub repository or contact us at busharthussain@gmail.com.

I hope this example description helps you write your own README file! Let me know if you have any other questions.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固