Logging in the freeRTOS kernel

I want to log some state information from within the freeRTOS kernel (I write directly to the file) for debugging purposes. However, using printf() just panic aborts the program after a call to lock_acquire() somehow, so I’m hoping there is a different solution?

Note: I’m using freeRTOS from ESPRESSIF.

What does the crash log say? Are you trying to call print from ISR? What are you trying to print?

NVM I figured it out. I was calling printf() from within a critical section. My bad. Of course that must break.