Download the PHP package understand/understand-laravel without Composer

On this page you can find all versions of the php package understand/understand-laravel. 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 understand-laravel

Laravel 5, 6, 7, 8, 9 and 10 integration for Understand.io

Latest Version on Packagist Quality Score Total Downloads

Introduction

This packages provides a full abstraction for Understand.io and provides extra features to improve Laravel's default logging capabilities. It is essentially a wrapper around Laravel's event handler to take full advantage of Understand.io's data aggregation and analysis capabilities.

Quick start

  1. Add the package to your project

  2. Add the ServiceProvider to the providers array in config/app.php

  3. Set your Understand.io input token in your .env file

  4. Send your first error

How to send events/logs

Laravel logs

By default, Laravel automatically stores its logs in storage/logs. By using this package, your log data will also be sent to your Understand.io channel. This includes error and exception logs, as well as any log events that you have defined (for example, Log::info('my custom log')).

PHP/Laravel exceptions

By default, all errors and exceptions with code fragments and stack traces will be sent to Understand.io.

The following extra information will be collected:

Type Default Config Key Config Options
SQL queries Enabled UNDERSTAND_SQL= true or false
SQL query values/bindings Disabled UNDERSTAND_SQL_BINDINGS= true or false
HTTP request query string data Enabled UNDERSTAND_QUERY_STRING= true or false
HTTP request form or JSON data Enabled UNDERSTAND_POST_DATA= true or false

Additionally, you can specify which HTTP request field values should not be sent to Understand.io. By default, the following field values will be hidden:

If you wish you can publish the configuration file and make desired adjustments. See Advanced configuration

How to send data asynchronously

Async handler

By default each log event will be sent to Understand.io's api server directly after the event happens. If you generate a large number of logs, this could slow your app down and, in these scenarios, we recommend that you make use of an async handler. To do this, set the config parameter UNDERSTAND_HANDLER to async in your .env file.

The async handler is supported in most systems - the only requirement is that the CURL command line tool is installed and functioning correctly. To check whether CURL is available on your system, execute following command in your console:

If you see instructions on how to use CURL then your system has the CURL binary installed and you can use the handler.

Keep in mind that Laravel allows you to specify different configuration values in different environments. You could, for example, use the async handler in production and the sync handler in development.

How to report Laravel 5.0 (>= 5.0, < 5.1) exceptions

Laravel's (>= 5.0, < 5.1) exception logger doesn't use event dispatcher (https://github.com/laravel/framework/pull/10922) and that's why you need to add the following line to your Handler.php file (otherwise Laravel's exceptions will not be sent Understand.io).

Advanced Configuration

  1. Publish configuration file

Log Filter

To filter out specific log types a custom log filter can be provided.

Example filter class

and then it can be configured in understand-laravel.php

The log_filter config value must be a callable type:

The suggested way would be to create an invokable class since it's hard to serialise anonymous functions (Laravel config cache):

The log filter interface must be as follows: $callable($level, $message, $context). The result of the filter must be a boolean value:

The ignored_logs config value has higher precedence than log_filter.

Requirements

UTF-8

This package uses the json_encode function, which only supports UTF-8 data, and you should therefore ensure that all of your data is correctly encoded. In the event that your log data contains non UTF-8 strings, then the json_encode function will not be able to serialize the data.

http://php.net/manual/en/function.json-encode.php

License

The Laravel Understand.io service provider is open-sourced software licensed under the MIT license


All versions of understand-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5 || ^7.0 || ^8.0 || ^8.1 || ^8.2
ext-curl Version *
illuminate/support Version ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
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 understand/understand-laravel contains the following files

Loading the files please wait ....