Download the PHP package m6web/log-bridge-bundle without Composer

On this page you can find all versions of the php package m6web/log-bridge-bundle. 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 log-bridge-bundle

LogBridgeBundle Build Status

Symfony Bundle to log Request/Response with Monolog.

NOTE: The actual version of this bundle support Symfony >= 4.4. If you need support for older versions, please use ~7.0 release.

Features

Install

With composer

Add to your AppKernel

Usage

Routes support multiples formats :

By default, level is info

You can declare all the options you want. By default, only response_body and post_parameters is supported by the DefaultFormatter

Status support multiples formats :

Instead of add can be use ! to exclude status

By default, this bundle use a builtin logger with monolog support m6web_log_bridge.logger You can override this configuration by writing your own logger who must implements Psr\Log\LoggerInterface :

Acme\DemoBundle\Logger\logger must be implement Psr\Log\LoggerInterface

Define your Provider from format log content

It is advisable to extend default provider M6Web\Bundle\LogBridgeBundle\Formatter\DefaultFormatter

default definition from service provider :

From override :

or simply override this parameter :

Log contents example

Request
------------------------
content-type        : 
content-length      : 
host                : domain.tld
x-real-ip           : *********
x-forwarded-for     : *********
x-forwarded-proto   : http
x-forwarded-port    : 80
remote-user         : u_glinel
connection          : close
cache-control       : max-age=0
authorization       : Basic ************
accept              : text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
user-agent          : Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/127.0.0.1 Chrome/127.0.0.1 Safari/537.36
accept-encoding     : gzip,deflate,sdch
accept-language     : fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
cookie              : PHPSESSID=************
php-auth-user       : u_glinel
x-php-ob-level      : 1
------------------------
Response
------------------------
HTTP 1.0 200
Age:           2
Etag:          
Vary:          
Cache-Control: no-cache
Content-Type:  application/json
Date:          dd mm yyyy hh:ii:ss GMT
------------------------
Response body
------------------------
Here response content

Logging exceptions

The bundle allow detailed logging of exceptions. This is ensured by the use of exception.log in the configuration.

This switch allows the bundle to register a listener which will save any received exception and passed it within the request under the defined attribute.

If you use the default formatter, change it using the configuration. The bundle provides another formatter implementation able to log exceptions.

If you prefer to use your own formatter, you will be able to read exceptions directly from the request under the attribute specified in m6_web_log_bridge.exception.request_attribute.

Tests

You can run the unit tests with the following command:


All versions of log-bridge-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/config Version ^4.4|^5.0|^6.0
symfony/yaml Version ^4.4|^5.0|^6.0
symfony/routing Version ^4.4|^5.0|^6.0
symfony/expression-language Version ^4.4|^5.0|^6.0
symfony/security-core Version ^4.4|^5.0|^6.0
symfony/dependency-injection Version ^4.4|^5.0|^6.0
symfony/http-kernel Version ^4.4|^5.0|^6.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 m6web/log-bridge-bundle contains the following files

Loading the files please wait ....