dipenparmar12/laravel-query-log 问题修复 & 功能扩展

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

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

dipenparmar12/laravel-query-log

Composer 安装命令:

composer require dipenparmar12/laravel-query-log

包简介

A Laravel package for log queries in user defined log channel. Your all queries will save in the log file, and you can view it anytime.

README 文档

README

Latest Version on Packagist Total Downloads

A Laravel package for log queries in user defined log channel. Your all queries will save in the log file, and you can view it anytime.

Installation

Install the package via composer:

composer require dipenparmar12/laravel-query-log

Note: Make sure this package used only in development environment, Otherwise may you face decreased performance in production.

Optionally, you can publish the config file of this package with this command:

php artisan vendor:publish --provider="Dipenparmar12\QueryLog\StoreQueryLogServiceProvider" --tag="config"

The following config file will be published in config/querylog.php

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Log Channels
    |--------------------------------------------------------------------------
    |
    | Here you may configure the log channels for query log.
    | This option defines the default log channel that gets used when writing
    | Query to the logs. The name specified in this option should match
    | one of the channels defined in the  `config/logging.php` "channels" configuration array.
    | You can define multiple channels seprated by comman (,) for query log.
    | 
    */

    'log_chhanels' =>  env('QUERY_LOG_CHHANELS', null),

    /*
    |--------------------------------------------------------------------------
    | To disable or enable the general query log.
    |--------------------------------------------------------------------------
    |
    | This option use to disable or enable the general query log,
    | Out of the box, Laravel uses the Monolog PHP logging library. 
    | This gives you a variety of powerful log handlers / formatters 
    | to utilize.
    |
    */

    'query_log_enable' => env('QUERY_LOG_ENABLE', true),

];

Usage

If you want to disable query log completely. change the following in .env file

QUERY_LOG_ENABLE=false

If we want to use query logging in multiple log channels, we can archive it by following .env

QUERY_LOG_CHHANELS='single,daily'

Note: Make sure the name specified in this option should match one of the channels defined in the config/logging.php channels configuration array.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email dipenparmar12@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固