# How to add log to code

**URL:** <https://forum.codecrafters.io/t/how-to-add-log-to-code/9960>\
**Category:** Challenges\
**Tags:** challenge:interpreter\
**Created:** [May 4, 2025, 3:50pm UTC](https://forum.codecrafters.io/t/how-to-add-log-to-code/9960 "2025-05-04T15:50:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PSQUAREJ](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/psquarej/32/10264_2.png) [@PSQUAREJ](https://forum.codecrafters.io/u/PSQUAREJ)\
**Post date:** [May 4, 2025, 3:50pm UTC](https://forum.codecrafters.io/t/how-to-add-log-to-code/9960/1 "2025-05-04T15:50:55Z")

</div>

I’m stuck on Stage #TZ7.  
Language I am using : C

**The issue :**  
I cant debug using print statements.  
Since this challenge is about multi line errors, and to pass the tests, the output in both `stdout` and `stderr` must be same as they have specified, I cant print log into any one of those output streams.

any way to write logs to screen that wont fail the test?

Thank you 🙂  
Have a good day.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [May 5, 2025, 1:13am UTC](https://forum.codecrafters.io/t/how-to-add-log-to-code/9960/4 "2025-05-05T01:13:40Z")

</div>

Hey @PSQUAREJ, unfortunately it’s a bit tricky to print debug info in our test runner for this case. I’d recommend testing it locally for easier debugging.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [May 11, 2025, 9:51pm UTC](https://forum.codecrafters.io/t/how-to-add-log-to-code/9960/7 "2025-05-11T21:51:26Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
