{"id":19783162,"url":"https://github.com/edmondscommerce/symfony-performance-logger","last_synced_at":"2026-07-10T05:32:01.553Z","repository":{"id":66730491,"uuid":"194865622","full_name":"edmondscommerce/symfony-performance-logger","owner":"edmondscommerce","description":"Provides basic Symfony performance logging that's safe to use in a live environment","archived":false,"fork":false,"pushed_at":"2019-07-04T07:52:54.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T00:50:36.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edmondscommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-02T13:11:26.000Z","updated_at":"2020-05-07T22:21:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e07d2e1-ce1f-47fc-9689-d522efd898ce","html_url":"https://github.com/edmondscommerce/symfony-performance-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edmondscommerce/symfony-performance-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fsymfony-performance-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fsymfony-performance-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fsymfony-performance-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fsymfony-performance-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edmondscommerce","download_url":"https://codeload.github.com/edmondscommerce/symfony-performance-logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fsymfony-performance-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35322488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12T06:07:29.218Z","updated_at":"2026-07-10T05:32:01.535Z","avatar_url":"https://github.com/edmondscommerce.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symfony-performance-logger\n## By [Edmonds Commerce](https://www.edmondscommerce.co.uk)\n\nProvides basic Symfony performance logging that's safe to use in a live environment.\n\n## Install\n\nIn order to install this module add the following to your `composer.json`:\n\n```text\n{\n  ...\n  \"require\": {\n      \"edmondscommerce/symfony-performance-logger\": \"dev-master\"\n  }, \n  ...\n  \"repositories\": [\n      {\n          \"type\": \"vcs\",\n          \"url\": \"https://github.com/edmondscommerce/symfony-performance-logger.git\"\n      }\n  ],\n  ...\n}\n```\n\n## Configure\n\nIn order to use these listeners you simply need to add the following to your `config/services.yaml`:\n\n```yaml\nservices:\n    # Log performance metrics\n    performance.logging:\n        class: EdmondsCommerce\\SymfonyPerformanceLogger\\PerformanceListener\n        tags:\n            - { name: kernel.event_listener, event: console.command }\n            - { name: kernel.event_listener, event: console.terminate }\n            - { name: kernel.event_listener, event: kernel.request }\n            - { name: kernel.event_listener, event: kernel.terminate }\n\n    # Configure the performance logger\n    EdmondsCommerce\\SymfonyPerformanceLogger\\PerformanceLogger:\n        arguments: [\u003cNumber of seconds you consider critically slow for a command / controller\u003e, '@monolog.logger.performance']\n```\n\nAnd then create the `performance` channel for all environments `config/packages/test/monolog.yaml`,\n`config/packages/dev/monolog.yaml` and `config/packages/prod/monolog.yaml`.\nThis is needed to ensure that `monolog.logger.performance` is available for DI (even though nothing will be logged\nin the other environments):\n\n```yaml\nmonolog:\n    # Create performance channel\n    channels: [\"performance\"]\n```\n\nFinally configure some logging for the `performance` channel in `config/packages/prod/monolog.yaml`:\n\n```yaml\nmonolog:\n    handlers:\n        # Log performance data\n        performance-stream:\n            type: stream\n            path: \"%kernel.logs_dir%/%kernel.environment%.performance.log\"\n            level: info\n            channels: [\"performance\"]\n        # Log performance data to Slack\n        performance-slackwebhook:\n            type: slackwebhook\n            level: critical\n            bot_name: 'Bot Name'\n            webhook_url: \"Web Hook Url\"\n            channel: \"Slack Channel\"\n            channels: [\"performance\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondscommerce%2Fsymfony-performance-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedmondscommerce%2Fsymfony-performance-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondscommerce%2Fsymfony-performance-logger/lists"}