定制 hxd/query-logger 二次开发

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

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

hxd/query-logger

最新稳定版本:v1.0.5

Composer 安装命令:

composer require hxd/query-logger

包简介

This is a package that saves all database queries to a log file with some customizations

README 文档

README

Latest Version on Packagist Total Downloads

This is a package that saves all database queries to a log file with some customizations

Installation

You can install the package via composer:

composer require hxd/query-logger

Usage

You can publish the config file with:

php artisan vendor:publish --tag="query-logger-config"

This is the contents of the published config file:

return [
    // Enable or disable query logger
    'enabled' => env('QUERY_LOGGER_ENABLED', true),

    // Enable or disable query logger for specific connection
    'enable_for_connection' => env('QUERY_LOGGER_ENABLE_FOR_CONNECTION', null),

    // Channel you want to save query into (must have in laravel logging channel config)
    'channel' => env('QUERY_LOGGER_LOG_CHANNEL', 'stack'),

    // Enable or Disable automatically assign values to the query,
    // by default the queries will be hidden values to ensure security.
    // Make sure you know what you're doing when you turn this on
    'enable_map_value' => env('QUERY_LOGGER_ENABLE_MAP_VALUE', true),

    // Log query execute time
    'log_execute_time' => env('QUERY_LOGGER_LOG_EXEC_TIME', true),

    // Look at the name, you know, the threshold to assign "SLOW QUERY" before your query in the log
    'slow_query_threshold' => env('QUERY_LOGGER_SLOW_QUERY_THRESHOLD', 0),

	// Log query execute path
	'log_execute_path' => env('QUERY_LOGGER_LOG_EXEC_PATH', true),

    // Log connetions
    'log_connections' => explode(',', env('QUERY_LOGGER_LOG_CONNECTIONS', '')),
];

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 me@hxd.vn instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-05