commit | 5e645b2d2671d7f02c0d9b9d3fe76fdc14fd4a46 | [log] [tgz] |
---|---|---|
author | Carlos Chinchilla <cachinchilla@google.com> | Mon Aug 02 20:48:33 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 03 17:31:12 2021 +0000 |
tree | 2869a9d89082c9b9ca04fa0cad1ba23092e3125c | |
parent | 505be03e3b3729fe0c184e0c4d20b0cb5dc3ff55 [diff] |
pw_log_rpc: Create Log RPC service & streams An RpcLogStream matches a Multisink::Drain with an RPC writer and is identified by the RPC channel ID. A persistent log stream can be created by assigning an open writer to the RpcLogStream, or can be set when the stream is inactive by the RPC Log service. A map is provided to collect all log streams, persistent and dynamic. It makes it easy to assign a writer to a log stream, or to flush all the log streams. Flushing is delegated to whatever owns the log stream map. Included is a single thread, single Multisink::Listener that sequentially flushes the log streams. Future work can make use of a work queue. Test: sample app using raw strings log entries works with pw_console calling: ```for payload in rpcs.pw.log.LogService.Listen.invoke(): for entry in payload.entries: LOG.info("%s", entry.message)``` No-Docs-Update-Reason: module is still under work. Change-Id: I20fdbabe3aeb298a22c27e7a655e77c3cfaa2c13 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/56001 Commit-Queue: Carlos Chinchilla <cachinchilla@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com>
See our website: http://pigweed.dev