Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium
New issue 330 by christop...@gmail.com: add the possiblity to choose
TextFormat default printer in java
http://code.google.com/p/protobuf/issues/detail?id=330
Hi,
I'm using slf4j to log protobuf messages.
Slf4j don't build log string if the level is not appropriate (thanks to the
message pattern that use placeholder):
logger.debug("blabla {} blabla", myProtobyMessage);
But I want a single line log so I'm using TextFormat.shortDebugString(). In
this case, the protobuf string is build anytime, so I'm obliged to add a
condition on the log level:
if (logger.isDebugEnabled()) {
logger.debug("blabla {} blabla",
TextFormat.shortDebugString(myProtobyMessage));
}
Should it be possible to define the default printer when we call a
MyProtobufMessage.toString()?
Thanks
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.