{"id":18832648,"url":"https://github.com/datto/php-json-rpc-log","last_synced_at":"2025-04-14T04:24:20.424Z","repository":{"id":56963097,"uuid":"47975950","full_name":"datto/php-json-rpc-log","owner":"datto","description":"Logged server extension for the JSON-RPC library","archived":false,"fork":false,"pushed_at":"2016-01-26T19:59:15.000Z","size":10,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T18:21:22.871Z","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":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-14T13:13:08.000Z","updated_at":"2015-12-15T22:46:31.000Z","dependencies_parsed_at":"2022-08-21T09:50:37.781Z","dependency_job_id":null,"html_url":"https://github.com/datto/php-json-rpc-log","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datto%2Fphp-json-rpc-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datto%2Fphp-json-rpc-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datto%2Fphp-json-rpc-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datto%2Fphp-json-rpc-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datto","download_url":"https://codeload.github.com/datto/php-json-rpc-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688571,"owners_count":21145766,"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-11-08T01:58:36.810Z","updated_at":"2025-04-14T04:24:20.399Z","avatar_url":"https://github.com/datto.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON-RPC Log Extension\n\nThis is a logger extension for the [php-json-rpc](https://github.com/datto/php-json-rpc) library. It provides a simple logging mechanism to log incoming JSON-RPC requests and the corresponding responses to a logger.\n\nExamples\n--------\nTo use the logged server, simply create a logger with a corresponding handler and pass it to a `Logger\\Server` instance. In this example, we'll use Monolog's `SyslogHandler` and the `Simple\\Evaluator` (see [php-json-rpc-simple](https://github.com/datto/php-json-rpc-simple)). This will log all requests and the responses to the system's syslog, typically found at `/var/log/syslog`:\n\n```php\n\u003c?php\n\nuse Datto\\JsonRpc\\Logged;\nuse Datto\\JsonRpc\\Simple;\nuse Monolog\\Handler\\SyslogHandler;\nuse Monolog\\Logger;\n\n$server = new Logged\\Server(\n    new Simple\\Evaluator(),\n    new Logger('API', array(new SyslogHandler('datto.api')))\n);\n\n$server-\u003ereply('{\"jsonrpc\": \"2.0\", \"method\": \"math/subtract\", \"params\": [6, 2], \"id\": 1}');\n```\n\nRequirements\n------------\n* PHP \u003e= 5.3\n\nInstallation\n------------\n```javascript\n\"require\": {\n  \"datto/json-rpc-log\": \"~4.0\"\n}\n```\n\nLicense\n-------\nThis package is released under an open-source license: [LGPL-3.0](https://www.gnu.org/licenses/lgpl-3.0.html).\n\nAuthor\n------\nWritten by [Philipp C. Heckel](https://github.com/binwiederhier).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatto%2Fphp-json-rpc-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatto%2Fphp-json-rpc-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatto%2Fphp-json-rpc-log/lists"}