title: How to log incoming messages in apache beam pipeline
body: <p>I am writing a simple apache beam streaming pipeline, taking input from a pubsub topic and storing this into bigquery. For hours I thought I am not able to even read a message, as I was simply trying to log the input to console:</p>
  
  <pre class="lang-py prettyprint-override"><code>events = p | 'Read PubSub' &gt;&gt; ReadFromPubSub(subscription=SUBSCRIPTION)
  logging.info(events)
  </code></pre>
  
  <p>When I write this to text it works fine! However my call to the <code>logger</code> never happens.</p>
  
  <p>How to people develop / debug these streaming pipelines?</p>
  
  <p>I have tried adding the following line:
  <code>events | 'Log' &gt;&gt; logging.info(events)</code></p>
  
  <p>Using <code>print()</code> also yields no results in the console.</p>