Download the PHP package akshitarora/dblog without Composer

On this page you can find all versions of the php package akshitarora/dblog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dblog

Laravel DB Log Library

GitHub

A simple Laravel library for devs to log your heavy queries bifurcated by the time taken in your application.

Useful when

Features

Install

composer require akshitarora/dblog

Add the ServiceProvider in app.php

AkshitArora\DbLog\DbLogServiceProvider::class,

Log structure

[database-name] [time-taken s] SELECT SQL QUERY WHERE PARAMETERS='VALUE' || Path METHOD: /slow/page/here

Configuration

Publish dblog.php configuration file into /config/ for configuration customization:

php artisan vendor:publish --provider=AkshitArora\DbLog\DbLogServiceProvider

Configuration options

<?php

return [
    'enabled' => env('DBLOG_ENABLED', env('APP_ENV') === 'local'),

    // Only record queries that are slower than the following time
    // Unit: seconds
    'query_slower_than' => env('DBLOG_QUERY_SLOWER_THAN', 0),

    // Only record queries when the DBLOG_TRIGGER is set in the environment,
    // or when the trigger HEADER, GET, POST, or COOKIE variable is set.
    'trigger' => env('DBLOG_TRIGGER'),

    // Log storage location
    'log_storage' => env('DBLOG_LOG_STORAGE',env('FILESYSTEM_DRIVER')),

    // Time brackets in which the queries are to be bifurcated
    'time_brackets' => [2,4,5],

    // Set the path in the storage folder where logs need to be stored
    'folder_path' => 'dblogs',
];

WARNING

The library writes the slow SQL queries log in the storage folder. Please ensure that the storage folder is not publically accessible if you've kept this library in production.

Special thanks to the package: https://github.com/overtrue/laravel-query-logger


All versions of dblog with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package akshitarora/dblog contains the following files

Loading the files please wait ....