title: In java streams using .peek() is regarded as to be used for debugging purposes only, would logging be considered as debugging?
body: <p>So I have a list of objects which I want part or whole to be processed, and I would want to log those objects that were processed.</p>
  
  <p>consider a fictional example:</p>
  
  <pre><code>List&lt;ClassInSchool&gt; classes;
  classes
  .stream()
  .filter(verifyClassInSixthGrade())
  .filter(classHasNoClassRoom())
  .peek(classInSchool -&gt; log.debug("Processing classroom {} in sixth grade without classroom.", classInSchool)
  .forEach(findMatchingClassRoomIfAvailable());
  </code></pre>
  
  <p>Would using .peek() in this instance be regarded as unintended use of the API?</p>
  
  <p>To further explain, in <a href="https://stackoverflow.com/questions/33635717/in-java-streams-is-peek-really-only-for-debugging">this question</a> the key takeaway is: <strong>"Don't use the API in an unintended way, even if it accomplishes your immediate goal."</strong> My question is whether or not every use of peek, short from debugging your stream until you have verified the whole chain works as designed and removed the .peek() again, is unintended use. So if using it as a means to log every object actually processed by the stream is considered unintended use.</p>