Download the PHP package understand/understand-laravel4 without Composer

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

Laravel 4 service provider for Understand.io

Build Status Latest Stable Version Latest Unstable Version License

You may also be interested in our Laravel 5, 6 or 7, Laravel Lumen service provider or Monolog Understand.io handler

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 this package to your composer.json

  2. Update composer.json packages

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

  4. Publish configuration file

  5. Set your input key in config file

  6. Send your first event

How to send events/logs

Laravel logs

By default, Laravel automatically stores its logs in . By using this package, your logs can 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, ).

Laravel logging documentation

PHP/Laravel exceptions

By default, All exceptions will be send to Understand.io service.

Eloquent model logs

Eloquent model logs are generated whenever one of the created, updated, deleted or restored Eloquent events is fired. This allows you to automatically track all changes to your models and will contain a current model diff ($model->getDirty()), the type of event (created, updated, etc) and additonal meta data (user_id, session_id, etc). This means that all model events will be transformed into a log event which will be sent to Understand.io.

By default model logs are disabled. To enable model logs, you can set the config value to true:

Additional meta data (field providers)

You may wish to capture additional meta data with each event. For example, it can be very useful to capture the request url with exceptions, or perhaps you want to capture the current user's ID. To do this, you can specify custom field providers via the config.

The Understand.io service provider contains a powerful field provider class which provides default providers, and you can create or extend new providers.

Default field providers

The following field providers are included in this package:

How to extend create your own methods or extend the field providers

Example

Lets assume that you have defined a custom field provider called getCurrentTemperature (as above). You should then add this to your config file as follows:

This additional meta data will then be automatically appended to all of your Laravel log events (Log::info('my_custom_event')), and will appear as follows:

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 a async handler. To do this, change the config parameter handler to async.

The async handler is supported in most of the systems - the only requirement is that 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.

Laravel queue handler

Although we generally recommend using the async handler, making use of queues is another another option. Bear in mind that by the default Laravel queue is sync, so you will still need to configure your queues properly using something like iron.io or Amazon SQS. See http://laravel.com/docs/queues for more information.

Configuration

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-laravel4 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
ext-curl Version *
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-laravel4 contains the following files

Loading the files please wait ....