Download the PHP package assimtech/dislog without Composer

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

Dislog

Latest Stable Version Total Downloads Latest Unstable Version License

Dislog is an API call logger. API calls differ from normal log events because they compose of a request and a response which happen at different times however should be logged together as they are related.

Framework integration

Symfony - DislogBundle

Usage

LoggingHttpClientInterface

A PSR-18 compatible LoggingHttpClient is provided if recording HTTP requests from a Psr\Http\Client\ClientInterface.

Note: if using Assimtech\Dislog\LoggingHttpClient you MUST install the following dependancies into your project:

Payload omission

If you only want to log metadata (everything except for the raw request / response) on certain responses you can use $omitPayload. If you decide after making the API call you DO want to log the raw request / response you may force the payload to be logged.

ApiCallLogger

The ApiCallLogger may be used to record requests and responses to both client and server side apis. Request and response payloads are both optional. If you are recording an FTP file upload, there may not be a response on successful upload. You would still invoke logResponse however to indicate the server accepted the file.

Here's an example of dislog in a fake Api:

Old logs can be cleaned up by calling remove on supporting handlers:

Handlers

Stream

This handler accepts a writable stream resource. You must also give it an identity generator and a serializer.

DoctrineDocumentManager

This handler accepts a Doctrine\ODM\MongoDB\DocumentManager.

Note: You must setup any mapping to an Assimtech\Dislog\Model\ApiCallInterface in your document manager WARNING: It is advisable to avoid using your application's default document manager as a flush() from dislog may interfere with your application

DoctrineEntityManager

This handler accepts a Doctrine\ORM\EntityManagerInterface.

Note: You must setup any mapping to an Assimtech\Dislog\Model\ApiCallInterface in your entity manager WARNING: It is advisable to avoid using your application's default entity manager as a flush() from dislog may interfere with your application

Processors

A processor is a callable which is executed on either the request or response payload. They can be used for modifying the request or response before the ApiCall is handled. An example might be to mask credit card numbers or obfuscate a password.

Processors are passed along with the logRequest and / or logResponse calls to process the appropriate payload.

Note: Processors are not invoked on a null request / response.

StringReplace

This processor is based on php's str_replace. It will replace a known string in a request / response.

RegexReplace

This processor is based on php's preg_replace. It will replace a regex in a request / response.

Serializers

A Serializer is a callable which converts an ApiCall into something a handler can deal with. Not all handers need to be paired with a Serializer and can deal with a raw ApiCall (e.g. DoctrineObjectManager).


All versions of dislog with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8
symfony/options-resolver Version ^3|^4|^5|^6
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 assimtech/dislog contains the following files

Loading the files please wait ....