https://github.com/antidot-framework/antidot-logger
Antidot Framework Logger Integration and Middleware
https://github.com/antidot-framework/antidot-logger
Last synced: 2 months ago
JSON representation
Antidot Framework Logger Integration and Middleware
- Host: GitHub
- URL: https://github.com/antidot-framework/antidot-logger
- Owner: antidot-framework
- License: bsd-2-clause
- Created: 2019-03-31T14:16:03.000Z (over 6 years ago)
- Default Branch: 2.x.x
- Last Pushed: 2023-07-02T09:39:13.000Z (almost 2 years ago)
- Last Synced: 2025-04-02T04:03:35.189Z (3 months ago)
- Language: PHP
- Homepage: https://logger.antidotfw.io/
- Size: 41 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Antidot Logger
==============[](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/?branch=2.x.x)
[](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/?branch=2.x.x)
[](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/build-status/2.x.x)
[](https://scrutinizer-ci.com/code-intelligence)
Application PSR-15 logger middleware:
* RequestLoggerMiddleware
* ExceptionLoggerMiddleware## Installation
Require package with [composer package manager](https://getcomposer.org/download/).
````bash
composer require antidot-fw/logger
````Add both Middleware to your Pipeline
````php
pipe(\Antidot\Logger\Application\Http\Middleware\ExceptionLoggerMiddleware::class);
$app->pipe(\Antidot\Logger\Application\Http\Middleware\RequestLoggerMiddleware::class);
````### Using [Zend Config Aggregator](https://framework.zend.com/blog/2017-04-20-config-aggregator.html)
It installs the library automatically
To use both middlewares in Zend Expressive you need to create factory classes
````php
get(LoggerInterface::class));
}
}````
````php
get(LoggerInterface::class));
}
}````