Page 1 of 1

generate log file

Posted: Fri May 25, 2018 5:37 am
by kishan patel
Hello,
We can see all debug print on monitor screen by using "make monitor" command. Now i want to save all that logs in one file. Is it possible means how can generate log file to debug purpose?

Thanks and Regards,
Kishan Patel.

Re: generate log file

Posted: Fri May 25, 2018 2:48 pm
by kolban
My notes seem to say that all debug/logging is written by calling the function that is registered with the esp_log_set_vprintf() ESP-IDF function. By default this writes to serial but looks like it could be used to write to an arbitrary location.

Re: generate log file

Posted: Fri May 25, 2018 3:40 pm
by fly135
If you are running on windows then use Teraterm and open a log file. Doesn't get any easier than that.

John A

Re: generate log file

Posted: Mon May 28, 2018 9:35 am
by kishan patel
Hello Fly135,
Actually i want to generate file on board means esp32. After some time which can be accessible.
Regards,
Kishan Patel.

Re: generate log file

Posted: Mon May 28, 2018 4:56 pm
by fly135
You can always create a file system on the flash and save it like a normal file. But that will require another block of code to transfer it to a host. Which could be simply reading the file, printing it, and capturing it with Teraterm.

John A

Re: generate log file

Posted: Tue May 29, 2018 5:31 am
by meneldor
Log files can grow rapidly and take precious flash space. One option is to log in separate log partition or better attach an external SD card which can be read faster in a pc.

Re: generate log file

Posted: Wed May 30, 2018 4:51 am
by kishan patel
Hello,
Thanks for reply. Is there any example available for log file?

Regards,
Kishan Patel.

Re: generate log file

Posted: Wed Mar 31, 2021 7:11 pm
by aelsayedhamouda
idf.py -p port monitor | tee run.log

Re: generate log file

Posted: Wed Nov 09, 2022 8:28 am
by bhavin.kaneria
any example for esp32 idf log file store in flash with partition
Log file in .txt file and max 5kb file size maximum file no 5.