{"id":13536334,"url":"https://github.com/Seldaek/monolog","last_synced_at":"2025-04-02T03:30:34.508Z","repository":{"id":37677674,"uuid":"1376664","full_name":"Seldaek/monolog","owner":"Seldaek","description":"Sends your logs to files, sockets, inboxes, databases and various web services","archived":false,"fork":false,"pushed_at":"2024-10-25T20:44:12.000Z","size":4792,"stargazers_count":21020,"open_issues_count":46,"forks_count":1902,"subscribers_count":317,"default_branch":"main","last_synced_at":"2024-10-29T21:56:12.820Z","etag":null,"topics":["hacktoberfest","logger","logging","php","psr-3"],"latest_commit_sha":null,"homepage":"https://seldaek.github.io/monolog/","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/Seldaek.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":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Seldaek"],"tidelift":"packagist/monolog/monolog"}},"created_at":"2011-02-17T02:07:15.000Z","updated_at":"2024-10-29T14:30:50.000Z","dependencies_parsed_at":"2023-12-07T16:48:39.779Z","dependency_job_id":"2258972a-d372-4282-a56a-e394cc4353d3","html_url":"https://github.com/Seldaek/monolog","commit_stats":{"total_commits":2001,"total_committers":518,"mean_commits":3.862934362934363,"dds":0.5687156421789106,"last_synced_commit":"b05bf55097060ec20f49ccec0cf2f8e5aaa468b3"},"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldaek%2Fmonolog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldaek%2Fmonolog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldaek%2Fmonolog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldaek%2Fmonolog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seldaek","download_url":"https://codeload.github.com/Seldaek/monolog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222145690,"owners_count":16938483,"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":["hacktoberfest","logger","logging","php","psr-3"],"created_at":"2024-08-01T09:00:37.339Z","updated_at":"2025-04-02T03:30:34.502Z","avatar_url":"https://github.com/Seldaek.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"logo.jpg\" alt=\"Monolog\" width=\"400\"\u003e\u003c/p\u003e\n\n# Monolog - Logging for PHP [![Continuous Integration](https://github.com/Seldaek/monolog/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/Seldaek/monolog/actions)\n\n[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog)\n[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog)\n\n\u003e**Note** This is the **documentation for Monolog 3.x**, if you are using older releases\n\u003esee the documentation for [Monolog 2.x](https://github.com/Seldaek/monolog/blob/2.x/README.md) or [Monolog 1.x](https://github.com/Seldaek/monolog/blob/1.x/README.md)\n\nMonolog sends your logs to files, sockets, inboxes, databases and various\nweb services. See the complete list of handlers below. Special handlers\nallow you to build advanced logging strategies.\n\nThis library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)\ninterface that you can type-hint against in your own libraries to keep\na maximum of interoperability. You can also use it in your applications to\nmake sure you can always use another compatible logger at a later time.\nAs of 1.11.0 Monolog public APIs will also accept PSR-3 log levels.\nInternally Monolog still uses its own level scheme since it predates PSR-3.\n\n\u003cdiv align=\"center\"\u003e\n  \u003chr\u003e\n  \u003csup\u003e\u003cb\u003eSponsored by:\u003c/b\u003e\u003c/sup\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://betterstack.com\"\u003e\n    \u003cdiv\u003e\n      \u003cimg src=\"https://github.com/Seldaek/monolog/assets/183678/7de58ce0-2fa2-45c0-b3e8-e60cebb3c4cf\" width=\"200\" alt=\"Better Stack\"\u003e\n    \u003c/div\u003e\n    \u003cdiv\u003e\n      Better Stack lets you centralize, search, and visualize your logs.\n    \u003c/div\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003chr\u003e\n\u003c/div\u003e\n\n## Installation\n\nInstall the latest version with\n\n```bash\ncomposer require monolog/monolog\n```\n\n## Basic Usage\n\n```php\n\u003c?php\n\nuse Monolog\\Level;\nuse Monolog\\Logger;\nuse Monolog\\Handler\\StreamHandler;\n\n// create a log channel\n$log = new Logger('name');\n$log-\u003epushHandler(new StreamHandler('path/to/your.log', Level::Warning));\n\n// add records to the log\n$log-\u003ewarning('Foo');\n$log-\u003eerror('Bar');\n```\n\n## Documentation\n\n- [Usage Instructions](doc/01-usage.md)\n- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md)\n- [Utility Classes](doc/03-utilities.md)\n- [Extending Monolog](doc/04-extending.md)\n- [Log Record Structure](doc/message-structure.md)\n\n## Support Monolog Financially\n\nGet supported Monolog and help fund the project with the [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog\u0026utm_medium=referral\u0026utm_campaign=enterprise) or via [GitHub sponsorship](https://github.com/sponsors/Seldaek).\n\nTidelift delivers commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.\n\n## Third Party Packages\n\nThird party handlers, formatters and processors are\n[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You\ncan also add your own there if you publish one.\n\n## About\n\n### Requirements\n\n- Monolog `^3.0` works with PHP 8.1 or above.\n- Monolog `^2.5` works with PHP 7.2 or above.\n- Monolog `^1.25` works with PHP 5.3 up to 8.1, but is not very maintained anymore and will not receive PHP support fixes anymore.\n\n### Support\n\nMonolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 or 3 where possible to benefit from all the latest features and fixes.\n\n### Submitting bugs and feature requests\n\nBugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues)\n\n### Framework Integrations\n\n- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)\n  can be used very easily with Monolog since it implements the interface.\n- [Symfony](http://symfony.com) comes out of the box with Monolog.\n- [Laravel](http://laravel.com/) comes out of the box with Monolog.\n- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog.\n- [PPI](https://github.com/ppi/framework) comes out of the box with Monolog.\n- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin.\n- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog.\n- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog.\n- [Nette Framework](http://nette.org/en/) is usable with Monolog via the [contributte/monolog](https://github.com/contributte/monolog) or [orisai/nette-monolog](https://github.com/orisai/nette-monolog) extensions.\n- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog.\n- [FuelPHP](http://fuelphp.com/) comes out of the box with Monolog.\n- [Equip Framework](https://github.com/equip/framework) comes out of the box with Monolog.\n- [Yii 2](http://www.yiiframework.com/) is usable with Monolog via the [yii2-monolog](https://github.com/merorafael/yii2-monolog) or [yii2-psr-log-target](https://github.com/samdark/yii2-psr-log-target) plugins.\n- [Hawkbit Micro Framework](https://github.com/HawkBitPhp/hawkbit) comes out of the box with Monolog.\n- [SilverStripe 4](https://www.silverstripe.org/) comes out of the box with Monolog.\n- [Drupal](https://www.drupal.org/) is usable with Monolog via the [monolog](https://www.drupal.org/project/monolog) module.\n- [Aimeos ecommerce framework](https://aimeos.org/) is usable with Monolog via the [ai-monolog](https://github.com/aimeos/ai-monolog) extension.\n- [Magento](https://magento.com/) comes out of the box with Monolog.\n- [Spiral Framework](https://spiral.dev) comes out of the box with Monolog bridge.\n\n### Author\n\nJordi Boggiano - \u003cj.boggiano@seld.be\u003e - \u003chttp://twitter.com/seldaek\u003e\u003cbr /\u003e\nSee also the list of [contributors](https://github.com/Seldaek/monolog/contributors) who participated in this project.\n\n### License\n\nMonolog is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n### Acknowledgements\n\nThis library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/)\nlibrary, although most concepts have been adjusted to fit to the PHP world.\n","funding_links":["https://github.com/sponsors/Seldaek","https://tidelift.com/funding/github/packagist/monolog/monolog","https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog\u0026utm_medium=referral\u0026utm_campaign=enterprise"],"categories":["Logging","Table of Contents","PHP","日志","目录","[PHP](#php)","日志 Logging","后端开发框架及项目",":gear: \u0026nbsp; Open-Source Slack Apps and Integrations","日志( Logging )","类库"],"sub_categories":["Logging","日志记录 Logging","PHP开发","PHP","未归类"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSeldaek%2Fmonolog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSeldaek%2Fmonolog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSeldaek%2Fmonolog/lists"}