title: Formatting protobuf for logs
body: <p>Given a simple protobuf message with one string field : </p>
  
  <pre><code>message Sample{
      required string msg = 1;
  }
  </code></pre>
  
  <p>and a sample code to print it : </p>
  
  <pre><code>Sample message = Sample.newBuilder()
      .setMsg("some text")
      .build();
  
  System.out.println(message);
  System.out.println(message);
  System.out.println(message);
  </code></pre>
  
  <p>result of this output will be : </p>
  
  <pre><code>msg: "some text"
  
  msg: "some text"
  
  msg: "some text"
  </code></pre>
  
  <p>There is '\n' line break with each message (actually each field).
  This is not good for loggers apparently.</p>
  
  <p>Serializing this with Gson is even worse as gson will serialize lot of other fields that were generated...</p>
  
  <pre><code>{"bitField0_":1,"msg_":"some text","memoizedIsInitialized":1,"unknownFields":{"fields":{}},"memoizedSize":-1,"memoizedHashCode":0}
  </code></pre>
  
  <p><strong>How do we convert protobuf message to a single string without line breaks?</strong></p>