Reputation: 11
I just want to parse an instance from a string when logging something, and don't care the result.
But when I update protobuf to 3.5.0, the annoying message is always printing to the terminal (stderr):
“Can't parse message of type because it is missing required fields”
Its fields must be required.
How can I stop printing the error message?
Upvotes: 0
Views: 801
Reputation: 12176
As far as I know, the protobuf library itself doesn't directly print to stderr. Instead, error messages are returned through the API like message->InitializationErrorString()
.
So it seems it is your own code that is printing this message to stderr, or perhaps you have enabled some debug mode.
You can try to add a debugger hook to the print to see where it is coming from.
Upvotes: 0
Reputation: 1063774
Options:
optional
instead of required
stderr
and send it to nul
Upvotes: 0