{"id":13617361,"url":"https://github.com/php-fig/log","last_synced_at":"2025-05-13T15:02:28.943Z","repository":{"id":5725171,"uuid":"6936773","full_name":"php-fig/log","owner":"php-fig","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-11T13:21:12.000Z","size":65,"stargazers_count":10436,"open_issues_count":7,"forks_count":181,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-05-05T22:15:51.438Z","etag":null,"topics":["psr-3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cloudjee/wavemaker","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-fig.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":"2012-11-30T09:49:24.000Z","updated_at":"2025-05-05T05:26:36.000Z","dependencies_parsed_at":"2022-07-14T21:46:56.201Z","dependency_job_id":"9d1cd7dd-9781-49dd-a968-14f0cd1f4bf8","html_url":"https://github.com/php-fig/log","commit_stats":{"total_commits":67,"total_committers":29,"mean_commits":2.310344827586207,"dds":0.7014925373134329,"last_synced_commit":"f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-fig%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-fig%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-fig%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-fig%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-fig","download_url":"https://codeload.github.com/php-fig/log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253968065,"owners_count":21992252,"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":["psr-3"],"created_at":"2024-08-01T20:01:40.501Z","updated_at":"2025-05-13T15:02:28.842Z","avatar_url":"https://github.com/php-fig.png","language":"PHP","readme":"PSR Log\n=======\n\nThis repository holds all interfaces/classes/traits related to\n[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md).\n\nNote that this is not a logger of its own. It is merely an interface that\ndescribes a logger. See the specification for more details.\n\nInstallation\n------------\n\n```bash\ncomposer require psr/log\n```\n\nUsage\n-----\n\nIf you need a logger, you can use the interface like this:\n\n```php\n\u003c?php\n\nuse Psr\\Log\\LoggerInterface;\n\nclass Foo\n{\n    private $logger;\n\n    public function __construct(LoggerInterface $logger = null)\n    {\n        $this-\u003elogger = $logger;\n    }\n\n    public function doSomething()\n    {\n        if ($this-\u003elogger) {\n            $this-\u003elogger-\u003einfo('Doing work');\n        }\n           \n        try {\n            $this-\u003edoSomethingElse();\n        } catch (Exception $exception) {\n            $this-\u003elogger-\u003eerror('Oh no!', array('exception' =\u003e $exception));\n        }\n\n        // do something useful\n    }\n}\n```\n\nYou can then pick one of the implementations of the interface to get a logger.\n\nIf you want to implement the interface, you can require this package and\nimplement `Psr\\Log\\LoggerInterface` in your code. Please read the\n[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)\nfor details.\n","funding_links":[],"categories":["Tools \u0026 Utilities","PHP"],"sub_categories":["Tokenizers \u0026 Prompt Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-fig%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-fig%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-fig%2Flog/lists"}