Download the PHP package bilfeldt/laravel-http-client-logger without Composer

On this page you can find all versions of the php package bilfeldt/laravel-http-client-logger. 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 laravel-http-client-logger

:open_file_folder: A logger for the Laravel HTTP Client

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

An easy yet very flexible logger for the Laravel HTTP Client.

Version Laravel PHP
1.* 8. | 9. 7.4. | 8.0.
2.* 9. | 10. | 11.* 8.1. | 8.2. | 8.3.*

Installation

You can install the package via composer:

Laravel

This package makes use of Laravels package auto-discovery mechanism so there is no need to do any futher steps - skip directly to the the Laravel Docs for more details.

Lumen

NOTE: Lumen is not officially supported by this package. However, we are currently not aware of any incompatibilities.

If you use Lumen register the service provider in bootstrap/app.php like so:

Config

Optionally in Laravel publish the config file with:

Usage

Using the logger will log both the request, the response and the response time of an external HTTP request made with the Laravel HTTP Client.

Basic logging

Conditional logging

This will log the request/response when the $condition evaluates to true.

Logging context

It is possible to supply context for the logger using:

Providing on-demand configuration

It is possible to provide on-demand configuration which will override the package configuration specified in config/laravel-http-client-logger.php:

Specifying a logger

The default logger and filter are specified in the package configuration logger and filter respectively but can be changed at runtime using:

Note that the logger must implement HttpLoggerInterface while the filter must implement HttpLoggingFilterInterface.

Logging example

The default logger converts the request and response to a PSR-7 HTTP message which is then logged as strings.

Log entry example when using default logger:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-http-client-logger with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3.0 | ~8.2.0 | ~8.1.0
ext-json Version *
guzzlehttp/guzzle Version ^7.2
illuminate/http Version ^9.0 || ^10.0 || ^11.0
illuminate/support Version ^9.0 || ^10.0 || ^11.0
spatie/laravel-package-tools 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 bilfeldt/laravel-http-client-logger contains the following files

Loading the files please wait ....