{"id":44882477,"url":"https://github.com/phlib/logger","last_synced_at":"2026-02-17T16:30:44.291Z","repository":{"id":36186678,"uuid":"40490859","full_name":"phlib/logger","owner":"phlib","description":"PHP PSR-3-compatible logger","archived":false,"fork":false,"pushed_at":"2025-04-06T08:04:48.000Z","size":155,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-28T16:57:14.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phlib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-08-10T15:42:59.000Z","updated_at":"2025-04-06T08:04:51.000Z","dependencies_parsed_at":"2024-02-02T17:55:54.317Z","dependency_job_id":null,"html_url":"https://github.com/phlib/logger","commit_stats":{"total_commits":104,"total_committers":7,"mean_commits":"14.857142857142858","dds":0.7307692307692308,"last_synced_commit":"dba018e7f47f6ac612b778325c9e8c89b0c67bc8"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/phlib/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlib%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlib%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlib%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlib%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phlib","download_url":"https://codeload.github.com/phlib/logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phlib%2Flogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29549795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-17T16:30:43.672Z","updated_at":"2026-02-17T16:30:44.281Z","avatar_url":"https://github.com/phlib.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phlib/logger\n\n[![Code Checks](https://img.shields.io/github/actions/workflow/status/phlib/logger/code-checks.yml?logo=github)](https://github.com/phlib/logger/actions/workflows/code-checks.yml)\n[![Codecov](https://img.shields.io/codecov/c/github/phlib/logger.svg?logo=codecov)](https://codecov.io/gh/phlib/logger)\n[![Latest Stable Version](https://img.shields.io/packagist/v/phlib/logger.svg?logo=packagist)](https://packagist.org/packages/phlib/logger)\n[![Total Downloads](https://img.shields.io/packagist/dt/phlib/logger.svg?logo=packagist)](https://packagist.org/packages/phlib/logger)\n![Licence](https://img.shields.io/github/license/phlib/logger.svg)\n\nPHP PSR-3-compatible logger\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require phlib/logger\n```\n\n## Usage\n\nExample config for a logger pool\n\n``` php\n$loggerConfig = [\n    'default' =\u003e [ // logger config identifier, used as facility/name in log messages\n        // multiple logger entries becomes a collection logger\n        [\n            // logger type (stream, gelf...)\n            'type'  =\u003e 'stream',\n            // the level of log messages to include (optional)\n            'level' =\u003e \\Psr\\Log\\LogLevel::ERROR, \n             // logger specific parameters\n            'path'  =\u003e '/var/log/my_app.log'\n        ],\n        [\n            'type'  =\u003e 'gelf',                \n            'level' =\u003e \\Psr\\Log\\LogLevel::INFO,\n             // logger specific parameters\n            'host'  =\u003e '127.0.0.1',\n            'port'  =\u003e 12201\n        ]\n    ],\n    'application' =\u003e 'default', // alias to another logger config\n    'api' =\u003e [\n        'type' =\u003e 'gelf',\n        'host' =\u003e '127.0.0.1',\n        'port' =\u003e 12201 \n    ]\n];\n\n```\n\nCreation of logger pool\n\n``` php\n$loggerPool = new \\Phlib\\Logger\\Pool(\n    new \\Phlib\\Logger\\Config($loggerConfig), \n    new \\Phlib\\Logger\\Factory()\n);\n\n```\n\nGet a logger instance\n``` php\n$applicationLogger = $loggerPool-\u003egetLogger('application');\n// or\n$applicationLogger = $loggerPool-\u003eapplication;\n\n$applicationLogger-\u003einfo('Logging is initialised');\n\n```\n\n## License\n\nThis package is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphlib%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphlib%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphlib%2Flogger/lists"}