title: Logging inside Stream
body: <p>I am trying to convert this piece of code to Java 8 stream:</p>
  <pre><code>if (list != null &amp;&amp; !list.isEmpty()) {
      Actor actor = null;
      for (Actor actor : list) {
          log.info(&quot;Actor being read: &quot;  actor.getCode());
          List&lt;String&gt; areaList = areaDAO.getArea(actor.getCode());
          if (!areaList.isEmpty()) {
              actor.setArea(areaList.get(0));
              log.info(&quot;Area{&quot; + areaList.get(0)
                   + &quot;} is fetched for actor{&quot; + actor.getCode() + &quot;}.&quot;);
          }
          this.getContext().setReadCount(1);
      }
  }
  </code></pre>
  <p>However I am not sure how to deal with logging in this case? Is it a good practice? Appreciate your help. Thanks</p>