---
title: "Discussion on \"Logging inside Java Stream\" | Hashnode"
description: "Discussion on \"Logging inside Java Stream\". Background\nOnce upon a time, I wanted to log something that was executed inside the Java stream for debugging purposes.\nBut, I didn't see anything logged there.\nSolution\nPut the log inside the peek() method instead of map().\nExample\nPreviously, I was..."
url: "https://hashnode.com/posts/logging-inside-java-stream/64ade341e7ef3197a6563d1b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Logging inside Java Stream](https://redhoyasa.hashnode.dev/logging-inside-java-stream?utm_source=hashnode&utm_medium=feed)

Background Once upon a time, I wanted to log something that was executed inside the Java stream for debugging purposes. But, I didn't see anything logged there. Solution Put the log inside the peek() method instead of map(). Example Previously, I was...

Jul 11, 2023 · 1 min read · redhoyasa.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)

## Written by

[Muhammad Redho Ayassa](https://hashnode.com/@redhoyasa)

@redhoyasa · Jakarta, Indonesia

  
[View profile](https://hashnode.com/@redhoyasa)

Software engineer with 6+ years of experience. Have been spending 5+ years in the fintech &amp; payment products domain. Specialized in backend and have delivered production-grade web app projects as well.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
