Download the PHP package understand/understand-lumen without Composer

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

The service provider is deprecated - it does not support error grouping.


Laravel Lumen service provider for Understand.io

Build Status Latest Stable Version Latest Unstable Version License HHVM Status Scrutinizer Code Quality

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

Introduction

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

Quick start

  1. Add this package to your project via composer:

  2. In bootstrap/app.php enable Dotenv (around line 5) AND $app->withFacades(); (around line 22):

  3. In bootstrap/app.php register the UnderstandLumenServiceProvider:

  4. Create a new file as config/understand_lumen.php (note that you may need to create the config directory) with the following contents:

  5. Set your input key (from Understand.io) in your .env file as UNDERSTAND_INPUT_KEY

  6. Open app/Exceptions/Handler.php and adjust the report method:

  7. Send your first event

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 getMyCustomValue (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 Lumen 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 Lumen 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.

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 Lumen Understand.io service provider is open-sourced software licensed under the MIT license


All versions of understand-lumen with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
understand/understand-monolog Version ~1.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-lumen contains the following files

Loading the files please wait ....