{"repo":"middlewares/access-log","free":true,"listed":false,"github":"https://github.com/middlewares/access-log","clone":"git clone https://github.com/middlewares/access-log.git","description":"PSR-15 middleware to generate access logs","language":"PHP","stars":20,"topics":["logging","access-logs","http","middleware","psr-15"],"license":"MIT","category":"analytics","readme_excerpt":"middlewares/access-log [![Latest Version on Packagist][ico-version]][link-packagist] [![Software License][ico-license]](LICENSE) ![Testing][ico-ga] [![Total Downloads][ico-downloads]][link-downloads] Middleware to generate access logs for each request using the Apache's access log format. This middleware requires a Psr log implementation, for example monolog. Requirements PHP = 7.2 A PSR-7 http library A PSR-15 middleware dispatcher A PSR-3 logger Installation This package is installable and autoloadable via Composer as middlewares/access-log. Example Usage This middleware uses PSR-3 logger standard to store the logs, so you need to pass a Psr\\Log\\LoggerInterface instance to the constructor. format This option allows to define the format used to save the log messages. You can create your own format (More info about the available options) ou use one of the following constants provided with predefined formats: AccessLog::FORMAT COMMON (Used by default) AccessLog::FORMAT COMMON VHOST AccessLog::FORMAT COMBINED AccessLog::FORMAT REFERER AccessLog::FORMAT AGENT AccessLog::FORMAT VHOST AccessLog::FORMAT COMMON DEBIAN AccessLog::FORMAT COMBINED DEBIAN AccessLog::FORMAT VHOST COMBINED DEBIAN ipAttribute By default uses the REMOTE ADDR server parameter to get the client ip. This option allows to use a request attribute. Useful to combine with any ip detection middleware, for example client-ip: hostnameLookups Enable the hostnameLookups flag used to get the remote hostname ( %h ). By d","default_branch":null,"files":null,"tree":[],"storefront":"/r/middlewares","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/middlewares/access-log/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}