PHPackages                             datto/json-rpc-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. datto/json-rpc-log

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

datto/json-rpc-log
==================

Logged server extension for JSON-RPC library

4.0.0(10y ago)112.0k↑233.3%1[1 PRs](https://github.com/datto/php-json-rpc-log/pulls)LGPL-3.0PHP

Since Dec 15Pushed 10y ago3 watchersCompare

[ Source](https://github.com/datto/php-json-rpc-log)[ Packagist](https://packagist.org/packages/datto/json-rpc-log)[ Docs](http://www.datto.com)[ RSS](/packages/datto-json-rpc-log/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

JSON-RPC Log Extension
======================

[](#json-rpc-log-extension)

This 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.

Examples
--------

[](#examples)

To 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`:

```
