All Projects → overtrue → Laravel Query Logger

overtrue / Laravel Query Logger

📝 A dev tool to log all queries for laravel application.

Projects that are alternatives of or similar to Laravel Query Logger

Performance
⏱ PHP performance tool analyser your script on time, memory usage and db query. Support Laravel and Composer for web, web console and command line interfaces.
Stars: ✭ 429 (+35.76%)
Mutual labels:  query, laravel
Eloquentfilter
An Eloquent Way To Filter Laravel Models And Their Relationships
Stars: ✭ 1,113 (+252.22%)
Mutual labels:  query, laravel
Laravel Eloquent Query Cache
Adding cache on your Laravel Eloquent queries' results is now a breeze.
Stars: ✭ 529 (+67.41%)
Mutual labels:  query, laravel
Laravel Database Logger
Log database query sql in Laravel Application, support Guard,Auth to multiple file record
Stars: ✭ 31 (-90.19%)
Mutual labels:  laravel, logger
Laravel Api Handler
Package providing helper functions for a Laravel REST-API
Stars: ✭ 150 (-52.53%)
Mutual labels:  query, laravel
Project
⭐️ Antares Project Application Skeleton. This is the very first place you should start. It allows you to create a brand new awesome project in easy few steps.
Stars: ✭ 84 (-73.42%)
Mutual labels:  laravel, logger
Laravel Graphql
GraphQL implementation with power of Laravel
Stars: ✭ 56 (-82.28%)
Mutual labels:  query, laravel
Laravel Console Logger
Logging and Notifications for Laravel Console Commands.
Stars: ✭ 79 (-75%)
Mutual labels:  laravel, logger
Laravel Db Profiler
Database Profiler for Laravel Web and Console Applications.
Stars: ✭ 141 (-55.38%)
Mutual labels:  query, laravel
Laravel Cacheable
Rinvex Cacheable is a granular, intuitive, and fluent caching system for eloquent models. Simple, but yet powerful, plug-n-play with no hassle.
Stars: ✭ 107 (-66.14%)
Mutual labels:  query, laravel
Laravel Log
Simple API to write logs for Laravel.
Stars: ✭ 19 (-93.99%)
Mutual labels:  laravel, logger
laravel-slow-query-logger
Slow Query Logger for Laravel 5.6
Stars: ✭ 27 (-91.46%)
Mutual labels:  query, logger
Lara Eye
Filter your Query\Builder using a structured query language
Stars: ✭ 39 (-87.66%)
Mutual labels:  query, laravel
Elasticsearch
Use SQL statements to query elasticsearch
Stars: ✭ 98 (-68.99%)
Mutual labels:  query, laravel
Sqldb Logger
A logger for Go SQL database driver without modify existing *sql.DB stdlib usage.
Stars: ✭ 160 (-49.37%)
Mutual labels:  query, logger
Apilogger
Small laravel package for viewing api logs which can be used in debugging.
Stars: ✭ 285 (-9.81%)
Mutual labels:  laravel, logger
Laravel Vue I18n Generator
Generates a vue-i18n compatible include file from your Laravel translations
Stars: ✭ 304 (-3.8%)
Mutual labels:  laravel
Laravel Bookings
Rinvex Bookable is a generic resource booking system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
Stars: ✭ 309 (-2.22%)
Mutual labels:  laravel
Laravel Starter
A CMS like modular starter application project built with Laravel 8.x.
Stars: ✭ 299 (-5.38%)
Mutual labels:  laravel
Laravel
A Vimeo bridge for Laravel
Stars: ✭ 302 (-4.43%)
Mutual labels:  laravel

Laravel Query Logger

📝 A dev tool to log all queries for Laravel application.

Installing

$ composer require overtrue/laravel-query-logger -vvv

Laravel Query Logger will be enabled when LOG_QUERY is true.

Usage

$ tail -f ./storage/logs/laravel.log
[2017-09-05 14:52:14] local.DEBUG: [800μs] select count(*) as aggregate from `discussions` where `discussions`.`deleted_at` is null | GET: http://laravel.app/discussions
[2017-09-05 14:52:14] local.DEBUG: [1.07ms] select * from `discussions` where `discussions`.`deleted_at` is null order by `is_top` desc, `created_at` desc limit 15 offset 0 | GET: http://laravel.app/discussions
[2017-09-05 14:52:14] local.DEBUG: [3.63s] select `tags`.*, `taggables`.`taggable_id` as `pivot_taggable_id`, `taggables`.`tag_id` as `pivot_tag_id` from `tags` inner join `taggables` on `tags`.`id` = `taggables`.`tag_id` where `taggables`.`taggable_id` in ('1', '2', '3', '4', '5', '6', '7', '8') and `taggables`.`taggable_type` = 'App\\Models\\Discussion' order by `order_column` asc | GET: http://laravel.app/discussions
[2017-09-05 14:52:14] local.DEBUG: [670μs] select * from `users` where `users`.`id` in ('1', '2', '4') and `users`.`deleted_at` is null | GET: http://laravel.app/discussions
...

Configuration

You can also control whether to log a query via the configuration file:

config/logging.php:

return [
    //...
    'query' => [
        'enabled' => env('LOG_QUERY', env('APP_ENV') === 'local'),
         
        // Only record queries that are slower than the following time
        // Unit: milliseconds
        'slower_than' => 0, 
        
        // Only record queries when the QUERY_LOG_TRIGGER is set in the environment, 
        // or when the trigger HEADER, GET, POST, or COOKIE variable is set.
        'trigger' => env('QUERY_LOG_TRIGGER'), 
    ],
];

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].