silpion / stack-logger
Logger Stack middleware for logging request and responses.
Installs: 11 136
Dependents: 1
Suggesters: 0
Security: 0
Stars: 7
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.3
- pimple/pimple: ~1.1
- psr/log: ~1.0
- symfony/http-foundation: ~2.1
- symfony/http-kernel: ~2.1
Requires (Dev)
- monolog/monolog: ~1.8
- phpunit/phpunit: 3.7.*
- silex/silex: ~1.2
- stack/builder: ~1.0
This package is not auto-updated.
Last update: 2024-10-26 16:26:05 UTC
README
Logger Stack middleware that logs Request and Response.
Usage
Example
Have a look at example.php
for a example how to use this middleware.
Options
The following options can be used:
-
logger (optional): A instance of a PSR-3 compatible logger, like Monolog. Default is a
NullLogger
. -
log_level (optional): The log level used for the log entries. Default is LogLevel::INFO.
-
log_sub_request (optional): Flag if Sub-Requests (HttpKernelInterface::SUB_REQUEST) should be logged. Default is false.
Intallation
The recommended way to install StackLogger is through Composer:
{ "require": { "silpion/stack-logger": "@stable" } }
Protip: you should browse the
silpion/stack-logger
page to choose a stable version to use, avoid the @stable
meta constraint.
License
StackLogger is released under the MIT License. See the bundled LICENSE file for details.