Add pw_log_rpc unit tests and documentation.
Add an enum to dictacte how to handle server writer errors in
RpcLogDrain.
Test: unit tests pass
Change-Id: Ib22dd3414cf344fddd6f179d43fd4d533ba12fd8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/56931
Pigweed-Auto-Submit: Carlos Chinchilla <cachinchilla@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
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>
This module was under construction and unfinished.
Disable pw_log_rpc sources depending on the deleted module.
Change-Id: I631ac3d086434ef0dbc8824c432c897336e203dc
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53861
Reviewed-by: Prashanth Swaminathan <prashanthsw@google.com>
Commit-Queue: Carlos Chinchilla <cachinchilla@google.com>
Pigweed-Auto-Submit: Carlos Chinchilla <cachinchilla@google.com>
This updates generated protobuf targets to use the format
<target>.<generator> instead of <target>_<generator> to improve
readability.
Change-Id: I52d1e398d5bbece7f79ae87e9a1df7fdce880a6b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22222
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
The "# gn-format disable" comments are no longer necessary. Delete these
comments and reformat with a Vim macro and gn format.
Change-Id: Ia62c40ad73eef91187d0d443d6e3b0fa723e5aa9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21380
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
The log protobuf format has been modified to accept signed integers for
the elapsed time, to account for negative deltas.
Change-Id: I3fbc4a1b1dd9cdd5402cd621d6dcf5ae3ec6ecc5
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/19040
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
Adds just the proto files from the in-progress logging module.
Change-Id: Ibe8ca60aaaf053cdfb184ec8dd413da49fc3b288
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/18780
Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
Reviewed-by: Keir Mierle <keir@google.com>