{"id":19665897,"url":"https://github.com/amphp/log","last_synced_at":"2025-04-28T22:31:28.649Z","repository":{"id":50311286,"uuid":"125770663","full_name":"amphp/log","owner":"amphp","description":"Non-blocking logging for PHP based on Amp and Monolog.","archived":false,"fork":false,"pushed_at":"2023-08-05T19:04:16.000Z","size":49,"stargazers_count":38,"open_issues_count":3,"forks_count":4,"subscribers_count":8,"default_branch":"2.x","last_synced_at":"2025-04-20T15:45:57.768Z","etag":null,"topics":["amphp","logging","php","psr-3"],"latest_commit_sha":null,"homepage":"","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/amphp.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":"2018-03-18T21:47:43.000Z","updated_at":"2025-03-11T20:57:55.000Z","dependencies_parsed_at":"2024-06-18T13:43:39.178Z","dependency_job_id":"0dace1c7-0ed6-4b9e-a879-000b63dc11cc","html_url":"https://github.com/amphp/log","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":"0.48275862068965514","last_synced_commit":"f65226ffa4dfe0dd63805f2af31aced9ed27efb6"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amphp","download_url":"https://codeload.github.com/amphp/log/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251397598,"owners_count":21583038,"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":["amphp","logging","php","psr-3"],"created_at":"2024-11-11T16:25:23.429Z","updated_at":"2025-04-28T22:31:25.297Z","avatar_url":"https://github.com/amphp.png","language":"PHP","funding_links":[],"categories":["Logging"],"sub_categories":["Tunnel"],"readme":"# amphp/log\n\nAMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.\n`amphp/log` provides a non-blocking stream handler for `monolog/monolog`.\n\n[![Release](https://img.shields.io/github/release/amphp/log.svg?style=flat-square)](https://github.com/amphp/log/releases)\n![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)\n\n## Installation\n\nThis package can be installed as a [Composer](https://getcomposer.org/) dependency.\n\n```bash\ncomposer require amphp/log\n```\n\n## Usage\n\n```php\n\u003c?php\n\nuse Amp\\ByteStream;\nuse Amp\\Log\\ConsoleFormatter;\nuse Amp\\Log\\StreamHandler;\nuse Monolog\\Logger;\n\nrequire dirname(__DIR__) . '/vendor/autoload.php';\n\n// You can also log to a file using amphp/file:\n// $handler = new StreamHandler(File\\openFile(__DIR__ . '/example.log', 'w'));\n\n// Here we'll log to the standard output stream of the current process:\n$handler = new StreamHandler(ByteStream\\getStdout());\n$handler-\u003esetFormatter(new ConsoleFormatter);\n\n$logger = new Logger('main');\n$logger-\u003epushHandler($handler);\n\n$logger-\u003edebug(\"Hello, world!\");\n$logger-\u003einfo(\"Hello, world!\");\n$logger-\u003enotice(\"Hello, world!\");\n$logger-\u003eerror(\"Hello, world!\");\n$logger-\u003ealert(\"Hello, world!\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphp%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famphp%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphp%2Flog/lists"}