laravel-sql-logger | Log SQL queries for Laravel/Lumen framework | SQL Database library

 by   mnabialek PHP Version: v2.2.9 License: MIT

kandi X-RAY | laravel-sql-logger Summary

kandi X-RAY | laravel-sql-logger Summary

laravel-sql-logger is a PHP library typically used in Database, SQL Database applications. laravel-sql-logger has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This module allows you to log SQL queries (and slow SQL queries) to log file in Laravel/Lumen framework. It's useful mainly when developing your application to verify whether your queries are valid and to make sure your application doesn't run too many or too slow database queries.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              laravel-sql-logger has a low active ecosystem.
              It has 146 star(s) with 19 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 17 have been closed. On average issues are closed in 35 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of laravel-sql-logger is v2.2.9

            kandi-Quality Quality

              laravel-sql-logger has 0 bugs and 0 code smells.

            kandi-Security Security

              laravel-sql-logger has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              laravel-sql-logger code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              laravel-sql-logger is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              laravel-sql-logger releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              laravel-sql-logger saves you 700 person hours of effort in developing the same functionality from scratch.
              It has 1625 lines of code, 133 functions and 20 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed laravel-sql-logger and discovered the below as its top functions. This is intended to give you an instant insight into laravel-sql-logger implemented functionality, and help decide if they suit your requirements.
            • Register the logger .
            • Get query line .
            • Save query .
            • Check if string is not inside quotes
            • Format the bindings .
            • Log query .
            • Get SQL query .
            • Get Artisan line .
            • Save a single line
            • Parse the file name .
            Get all kandi verified functions for this library.

            laravel-sql-logger Key Features

            No Key Features are available at this moment for laravel-sql-logger.

            laravel-sql-logger Examples and Code Snippets

            No Code Snippets are available at this moment for laravel-sql-logger.

            Community Discussions

            Trending Discussions on laravel-sql-logger

            QUESTION

            Cannot upgrade Laravel from 6 to 7 composer hangs
            Asked 2021-Feb-01 at 15:34

            I'm trying to upgrade Laravel from v6 to v7. I followed the guide in the documentation, but when I run composer update nothing happens. I've tried waiting for hours and still nothing. Running composer in debug mode with composer update -vvv yields this:

            ...

            ANSWER

            Answered 2021-Feb-01 at 15:05

            Your dependencies won't work together: Laravel v7 requires Symfony in v5, so putting "symfony/process": "^4.5" in the list of packages can not be resolved (especially as there is no version of Symfony matching that constraint). Remove this constraint, as laravel/framework already requires symfony/process - you don't gain anything by requiring it once more.

            Next up: phpmentors/workflower is not yet compatible with Symfony v5, this could also cause problems.

            Source https://stackoverflow.com/questions/65992853

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install laravel-sql-logger

            in console to install this module (Notice --dev flag - it's recommended to use this package only for development).
            Run composer require mnabialek/laravel-sql-logger --dev in console to install this module (Notice --dev flag - it's recommended to use this package only for development).
            If you use Laravel < 5.5 open config/app.php and in providers section add: Mnabialek\LaravelSqlLogger\Providers\ServiceProvider::class, Laravel 5.5 uses Package Auto-Discovery and it will automatically load this service provider so you don't need to add anything into above file. If you are using Lumen open bootstrap/app.php and add: $app->register(Mnabialek\LaravelSqlLogger\Providers\ServiceProvider::class);
            If you use Laravel < 5.5 run: php artisan vendor:publish --provider="Mnabialek\LaravelSqlLogger\Providers\ServiceProvider" in your console to publish default configuration files. If you are using Laravel 5.5 run: php artisan vendor:publish and choose the number matching "Mnabialek\LaravelSqlLogger\Providers\ServiceProvider" provider. By default you should not edit published file because all the settings are loaded from .env file by default. For Lumen you should skip this step.
            In your .env file add the following entries: SQL_LOGGER_DIRECTORY="logs/sql" SQL_LOGGER_USE_SECONDS=false SQL_LOGGER_CONSOLE_SUFFIX= SQL_LOGGER_LOG_EXTENSION=".sql" SQL_LOGGER_ALL_QUERIES_ENABLED=true SQL_LOGGER_ALL_QUERIES_OVERRIDE=false SQL_LOGGER_ALL_QUERIES_PATTERN="#.*#i" SQL_LOGGER_ALL_QUERIES_FILE_NAME="[Y-m-d]-log" SQL_LOGGER_SLOW_QUERIES_ENABLED=true SQL_LOGGER_SLOW_QUERIES_MIN_EXEC_TIME=100 SQL_LOGGER_SLOW_QUERIES_PATTERN="#.*#i" SQL_LOGGER_SLOW_QUERIES_FILE_NAME="[Y-m-d]-slow-log" SQL_LOGGER_FORMAT_NEW_LINES_TO_SPACES=false SQL_LOGGER_FORMAT_ENTRY_FORMAT="/* [origin]\\n Query [query_nr] - [datetime] [[query_time]] */\\n[query]\\n[separator]\\n" and adjust values to your needs. You can skip variables for which you want to use default values. If you have also .env.sample it's also recommended to add those entries also in .env.sample file just to make sure everyone know about those env variables. Be aware that SQL_LOGGER_DIRECTORY is directory inside storage directory. If you want you can change it editing config/sql_logger.php file. To find out more about those setting please take a look at Configuration file
            Make sure directory specified in .env file exists in storage path and you have valid file permissions to create and modify files in this directory (If it does not exist this package will automatically create it when needed but it's recommended to create it manually with valid file permissions)
            Make sure on live server you will set logging SQL queries to false in your .env file. This package is recommended to be used only for development to not impact production application performance.

            Support

            Using this package is free of charge, however to keep it up-to-date and add new features small money support is appreciated. Suggested amount is 5$ per project where you use this package but any amount will help further development of this package. (you are free to change amount on Paypal page).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link