{"id":19327689,"url":"https://github.com/antidot-framework/antidot-logger","last_synced_at":"2025-04-22T21:30:31.084Z","repository":{"id":46013168,"uuid":"178697481","full_name":"antidot-framework/antidot-logger","owner":"antidot-framework","description":"Antidot Framework Logger Integration and Middleware","archived":false,"fork":false,"pushed_at":"2023-07-02T09:39:13.000Z","size":42,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"2.x.x","last_synced_at":"2025-04-02T04:03:35.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://logger.antidotfw.io/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antidot-framework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"kpicaza"}},"created_at":"2019-03-31T14:16:03.000Z","updated_at":"2021-11-20T09:20:17.000Z","dependencies_parsed_at":"2022-08-02T19:45:20.839Z","dependency_job_id":null,"html_url":"https://github.com/antidot-framework/antidot-logger","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antidot-framework%2Fantidot-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antidot-framework%2Fantidot-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antidot-framework%2Fantidot-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antidot-framework%2Fantidot-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antidot-framework","download_url":"https://codeload.github.com/antidot-framework/antidot-logger/tar.gz/refs/heads/2.x.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250328088,"owners_count":21412555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T02:18:10.308Z","updated_at":"2025-04-22T21:30:30.744Z","avatar_url":"https://github.com/antidot-framework.png","language":"PHP","funding_links":["https://github.com/sponsors/kpicaza"],"categories":[],"sub_categories":[],"readme":"Antidot Logger\n==============\n\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/?branch=2.x.x)\n[![Code Coverage](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/?branch=2.x.x)\n[![Build Status](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/badges/build.png?b=master)](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/build-status/2.x.x)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/antidot-framework/antidot-logger/badges/code-intelligence.svg?b=2.x.x)](https://scrutinizer-ci.com/code-intelligence)\n![Maintainability](https://api.codeclimate.com/v1/badges/dd5349c19f7991e3fa95/maintainability)\n\nApplication PSR-15 logger middleware:\n\n* RequestLoggerMiddleware\n* ExceptionLoggerMiddleware\n\n## Installation\n\nRequire package with [composer package manager](https://getcomposer.org/download/).\n\n````bash\ncomposer require antidot-fw/logger\n````\n\nAdd both Middleware to your Pipeline\n\n````php\n\u003c?php\n// with Antidot Framework, Zend Expressive or Zend Stratigility\n\n$app-\u003epipe(\\Antidot\\Logger\\Application\\Http\\Middleware\\ExceptionLoggerMiddleware::class);\n$app-\u003epipe(\\Antidot\\Logger\\Application\\Http\\Middleware\\RequestLoggerMiddleware::class);\n````\n\n### Using [Zend Config Aggregator](https://framework.zend.com/blog/2017-04-20-config-aggregator.html)\n\nIt installs the library automatically\n\nTo use both middlewares in Zend Expressive you need to create factory classes\n\n````php\n\u003c?php\n// src/App/Container/ExceptionLoggerMiddlewareFactory.php\n\nnamespace App\\Container;\n\nuse Antidot\\Logger\\Application\\Http\\Middleware\\ExceptionLoggerMiddleware;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\nclass ExceptionLoggerMiddlewareFactory\n{\n    public function __invoke(ContainerInterface $container)\n    {\n        return new ExceptionLoggerMiddleware($container-\u003eget(LoggerInterface::class));\n    }\n}\n\n````\n\n````php\n\u003c?php\n// src/App/Container/RequestLoggerMiddlewareFactory.php\n\nnamespace App\\Container;\n\nuse Antidot\\Logger\\Application\\Http\\Middleware\\RequestLoggerMiddleware;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\nclass RequestLoggerMiddlewareFactory\n{\n    public function __invoke(ContainerInterface $container)\n    {\n        return new RequestLoggerMiddleware($container-\u003eget(LoggerInterface::class));\n    }\n}\n\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantidot-framework%2Fantidot-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantidot-framework%2Fantidot-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantidot-framework%2Fantidot-logger/lists"}