{"id":16673939,"url":"https://github.com/sensorario/yaphlo","last_synced_at":"2026-04-27T14:04:09.155Z","repository":{"id":45228647,"uuid":"428825233","full_name":"sensorario/yaphlo","owner":"sensorario","description":"Yet another php logger","archived":false,"fork":false,"pushed_at":"2022-01-02T02:33:41.000Z","size":73,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T19:45:41.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sensorario.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-16T21:53:46.000Z","updated_at":"2021-12-15T01:05:20.000Z","dependencies_parsed_at":"2022-09-05T05:11:40.639Z","dependency_job_id":null,"html_url":"https://github.com/sensorario/yaphlo","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fyaphlo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fyaphlo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fyaphlo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fyaphlo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensorario","download_url":"https://codeload.github.com/sensorario/yaphlo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243326588,"owners_count":20273510,"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":[],"created_at":"2024-10-12T12:28:49.893Z","updated_at":"2025-12-27T18:36:28.215Z","avatar_url":"https://github.com/sensorario.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaphlo\n\nYet another php logger\n\n## Example with class configuration\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse Sensorario\\Yaphlo\\Logger;\nuse Sensorario\\Yaphlo\\Message;\nuse Sensorario\\Yaphlo\\Writer;\nuse Sensorario\\Yaphlo\\WriterAdapter;\nuse Sensorario\\Yaphlo\\Config;\nuse Sensorario\\Yaphlo\\ArrayConfig;\nuse Sensorario\\Yaphlo\\CustomConfig;\n\n$logger = new Logger(\n    new Message,\n    new Writer(\n        new CustomConfig(\n            Message::LEVEL_INFO,\n            ['channel A'],\n        ),\n        new WriterAdapter(\n            __DIR__ . '/logger.log',\n        )\n    )\n);\n\n$logger-\u003einfo(['write' =\u003e 'this']);\n$logger-\u003eerror(['write' =\u003e 'this']);\n\n$logger-\u003einfo(['write' =\u003e 'this'], 'channel A');\n$logger-\u003einfo(['write' =\u003e 'this'], 'channel B');\n```\n\n\n## Example with array configuration\n\nI prefer this way because configuration can be placed into a configuration file and bla bla bla.\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse Sensorario\\Yaphlo\\Logger;\nuse Sensorario\\Yaphlo\\Message;\nuse Sensorario\\Yaphlo\\Writer;\nuse Sensorario\\Yaphlo\\WriterAdapter;\n\n$config = [\n    'logger' =\u003e [\n        'level' =\u003e 'INFO',\n        'enabledChannels' =\u003e [\n            'channel A',\n        ],\n    ],\n];\n\n$logger = new Logger(\n    new Message,\n    new Writer(\n        new ArrayConfig($config),\n        new WriterAdapter(\n            __DIR__ . '/logger.log',\n        )\n    )\n);\n\n$logger-\u003einfo(['write' =\u003e 'this']);\n$logger-\u003eerror(['write' =\u003e 'this'], 'channel A');\n```\n\n## What both scripts will write in logs, ...\n\n    [2021-12-13 00:21:08] [INFO] [channel A] {\n    [2021-12-13 00:21:08] [INFO] [channel A]     \"write\": \"this\"\n    [2021-12-13 00:21:08] [INFO] [channel A] }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensorario%2Fyaphlo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensorario%2Fyaphlo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensorario%2Fyaphlo/lists"}