{"id":23353667,"url":"https://github.com/jd297/psr-logger","last_synced_at":"2025-10-16T07:10:24.079Z","repository":{"id":221062883,"uuid":"753350864","full_name":"JD297/psr-logger","owner":"JD297","description":"Simple implementation of PSR-3 (Logger Interface)","archived":false,"fork":false,"pushed_at":"2024-08-07T17:07:28.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T20:49:13.758Z","etag":null,"topics":["logger","logging","psr","psr-3"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/jd297/psr-logger","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/JD297.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}},"created_at":"2024-02-06T00:07:24.000Z","updated_at":"2024-02-06T00:10:50.000Z","dependencies_parsed_at":"2024-02-06T00:57:14.900Z","dependency_job_id":null,"html_url":"https://github.com/JD297/psr-logger","commit_stats":null,"previous_names":["jd297/psr-logger"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JD297%2Fpsr-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JD297%2Fpsr-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JD297%2Fpsr-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JD297%2Fpsr-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JD297","download_url":"https://codeload.github.com/JD297/psr-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713263,"owners_count":20983683,"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":["logger","logging","psr","psr-3"],"created_at":"2024-12-21T09:15:11.557Z","updated_at":"2025-10-16T07:10:19.030Z","avatar_url":"https://github.com/JD297.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# psr-logger (PSR-3)\n\nSimple implementation of [PSR-3 (Logger Interface)](https://www.php-fig.org/psr/psr-3/).\n\n## Requirements\n\nThe following versions of PHP are supported by this version.\n\n* PHP ^8.1\n\n# Usage\n\n## Handler\n\nAll handlers implement the _Jd297\\Psr\\Logger\\Handler\\HandlerInterface_.\n\n### FileHandler\n\nThe _FileHandler_ logs to a file that is specified in the first argument.\n\n```php\nuse Jd297\\Psr\\Logger\\Handler\\FileHandler;\n\n$fileHandler = new FileHandler('[projectdir]/log/dev.log');\n```\n\n## Logger\n\nInstantiate a _Logger_ with a Clock that implements _Psr\\Clock\\ClockInterface_ and an array of handlers that implement _Jd297\\Psr\\Logger\\Handler\\HandlerInterface_.\n\n```php\nuse Jd297\\Psr\\Clock\\SystemClock;\nuse Jd297\\Psr\\Logger\\Logger;\nuse Psr\\Log\\LogLevel;\n\n$logger = new Logger(new SystemClock(), [$fileHandler]);\n\n$logger-\u003elog(LogLevel::INFO, 'User \"{username}\" created with email \"{email}\".', [\n    'username' =\u003e 'john',\n    'email' =\u003e 'john.doe@local.local',\n]);\n```\n\n## Composer\n\n### Scripts\n\nReformat code with [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer).\n``` bash\n$ composer reformat\n```\n\nTest source code with [PHPUnit](https://github.com/sebastianbergmann/phpunit).\n``` bash\n$ composer unit\n```\n\nAnalyse files with [PHPStan](https://github.com/phpstan/phpstan) (Level 9).\n``` bash\n$ composer analyse\n```\n\n## License\n\nThe BSD 2-Clause \"Simplified\" License (BSD-2-Clause). Please see [License File](https://github.com/jd297/psr-logger/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd297%2Fpsr-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjd297%2Fpsr-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd297%2Fpsr-logger/lists"}