title: Protocol buffers logging
body: <p>In our business, we require to log every request/response which coming to our server.
  At this time being, we are using xml as standard implementation.
  Log files are used if we need to debug/trace some error.</p>
  
  <p>I am kind of curious if we switch to protocol buffers, since it is binary, what will be the best way to log request/response to file?</p>
  
  <p>For example:</p>
  
  <pre><code>FileOutputStream output = new FileOutputStream("\\files\log.txt");
  request.build().writeTo(outout);
  </code></pre>
  
  <p>For anyone who has used protocol buffers in your application, how do you log your request/response, just in case we need it for debugging purpose?</p>