Skip to content

Commit

Permalink
pw_log: Mark LogEntry.message as optional
Browse files Browse the repository at this point in the history
There is a functional and useful difference between a LogEntry having
no message, and an empty one, so use optional correctly to distinguish
those cases.

Change-Id: I8fe19dee374878a997ac0a8c76eb0b844575d9d3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/97792
Reviewed-by: Keir Mierle <[email protected]>
Commit-Queue: Scott James Remnant <[email protected]>
  • Loading branch information
keybuk authored and CQ Bot Account committed Jun 13, 2022
1 parent 6ee3471 commit 68ab15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pw_log/log.proto
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ message LogEntry {
// payload = N bytes; typically 4-10 in practice
//
// Total: 2 + N ~= 6-12 bytes
bytes message = 1 [(tokenizer.format) = TOKENIZATION_OPTIONAL];
optional bytes message = 1 [(tokenizer.format) = TOKENIZATION_OPTIONAL];

// Packed log level and line number. Structure:
//
Expand Down

0 comments on commit 68ab15c

Please sign in to comment.