Download the PHP package etsglobal/log-bundle without Composer
On this page you can find all versions of the php package etsglobal/log-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package log-bundle
LogBundle
Provides normalized logging and tracing features for all ETSGlobal Symfony applications.
Overview
Main features:
- Automatic logger injection.
- Provide
TokenCollection
utility to enable downstream applications for request tracing from app to app. - Automatically configure
global
andprocess
token tracing for incoming HTTP requests/responses as well as long-running processes. - Automatically enrich log context with the application name and tracing tokens.
- Processor to change the log level of exceptions, like Symfony's
NotFoundHttpException
- Slack handler: An extended version of Monolog's slack handler, with custom message contents, and custom filters.
- Provides a Guzzle middleware to forward tokens through HTTP calls.
- Provides a Symfony HttpClient decorator to forward tokens through HTTP calls.
Installation
-
Install the bundle
- Load the bundle
For Symfony < 4
Configuration
Bundle configuration
Monolog configuration
If you want to use the slack handler provided by this bundle, add the following configuration:
If you have a file handler, you might want to use the token_collection formatter to add the tracing tokens:
Automatic logger injection
Automatic logger injection will try to inject the logger in all services tagged with the ets_global_log.logger_aware
tag.
The services hate to implement Psr\Log\LoggerAwareInterface
to receive the logger by setter injection.
Symfony HttpClient decorator
Install symfony/http-client
:
Configure your scoped client:
Just inject the my.client
HttpClient in your services like normally.
The HttpClientDecorator
will decorate the HttpClient to automatically inject the token_global
in the request.
Guzzle middleware
Install csa/guzzle-bundle
:
Configure HTTP clients with the "token_global" middleware:
All versions of log-bundle with dependencies
ext-json Version *
ext-mbstring Version *
graylog2/gelf-php Version ^2.0
symfony/config Version ^7.0
symfony/console Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/http-client Version ^7.0
symfony/http-kernel Version ^7.0
symfony/monolog-bundle Version ^3.10