Download the PHP package integration-eye/logging-probe without Composer

On this page you can find all versions of the php package integration-eye/logging-probe. 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 logging-probe

Integration Eye Logging Probe

This library is implementation of PSR-3 Logger Interface sending log messages and exceptions to Integration Eye instance.

Installation

This library is available in Packagist, so you can install it using Composer:

For usage of this library, you need to provide implementation of Client interface. If you install symfony/http-client package, default implementation will be provided.

For more information about custom Client implementation see Client.

Simple Usage

There is Logger::fromDsn($dsn) factory function for simple instantiation of Logger.

Logger implements PSR-3 Logger Interface so you can use is as follows:

You can pass internal flags like @principal into context, and it will be used as metadata.

For more information about providing @principal, see PrincipalProvider.

Advanced Usage

Logger is composed of MessageFactory instance and Client implementation.

Here is an example of creating Logger manually without Logger::fromDsn($dsn) factory method.

Extensions

Client

Client interface consist of single method sendMessage(Configuration $configuration, array $payload): void which purpose is to send POST request to configured endpoint.

Optional default implementation is using symfony/http-client, but you can provide your own, if it is not what you need.

Here is a simplified example of existing client for testing purposes.

PrincipalProvider

To send @principal metadata with your logs, you can provide implementation of PrincipalProvider. It has single method getPrincipal(): ?string which you can override.

Here is an example of custom implementation:

If you want, you can use built-in DefaultPrincipalProvider for static resolution of principal.

Mapper

You can provide implementations of Mapper interface for simplifying your logging. It consists of two methods supports(string $key, $value): bool and map(string $key, $value): array.

Here is a simplified example of existing mapper for JsonSerializable objects:

This library provides some built-in mappers:

When you use Logger::fromDsn($dsn) or MessageFactory::instance($configuration), all built-in mappers will be automatically registered with their default configuration.


All versions of logging-probe with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.1
ext-json Version *
psr/log Version ^1.1
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 integration-eye/logging-probe contains the following files

Loading the files please wait ....