diff --git a/pw_log/log.proto b/pw_log/log.proto index aa45583aa1..a1f4e7011d 100644 --- a/pw_log/log.proto +++ b/pw_log/log.proto @@ -201,7 +201,7 @@ message FilterRule { Action action = 4; // Condition 4: (thread_equals.size() == 0 || log.thread == thread_equals). - optional bytes thread_equals = 5 [(tokenizer.format) = TOKENIZATION_OPTIONAL]; + bytes thread_equals = 5 [(tokenizer.format) = TOKENIZATION_OPTIONAL]; } // A filter is a series of rules. First matching rule wins. diff --git a/pw_log_rpc/public/pw_log_rpc/log_filter_service.h b/pw_log_rpc/public/pw_log_rpc/log_filter_service.h index bb074afbdb..3532ef2b89 100644 --- a/pw_log_rpc/public/pw_log_rpc/log_filter_service.h +++ b/pw_log_rpc/public/pw_log_rpc/log_filter_service.h @@ -58,10 +58,12 @@ class FilterService final (protobuf::SizeOfFieldEnum( log::FilterRule::Fields::LEVEL_GREATER_THAN_OR_EQUAL, 7) + protobuf::SizeOfFieldBytes(log::FilterRule::Fields::MODULE_EQUALS, - 6) + + cfg::kMaxModuleNameBytes) + protobuf::SizeOfFieldUint32(log::FilterRule::Fields::ANY_FLAGS_SET, 1) + - protobuf::SizeOfFieldEnum(log::FilterRule::Fields::ACTION, 2)); + protobuf::SizeOfFieldEnum(log::FilterRule::Fields::ACTION, 2) + + protobuf::SizeOfFieldBytes(log::FilterRule::Fields::THREAD_EQUALS, + cfg::kMaxThreadNameBytes)); static constexpr size_t kFilterIdsResponseBufferSize = kMinSupportedFilters *