generate log file

kishan patel
Posts: 45
Joined: Wed Aug 30, 2017 4:56 am

generate log file

Postby kishan patel » Fri May 25, 2018 5:37 am

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.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: generate log file

Postby kolban » Fri May 25, 2018 2:48 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: generate log file

Postby fly135 » Fri May 25, 2018 3:40 pm

If you are running on windows then use Teraterm and open a log file. Doesn't get any easier than that.

John A

kishan patel
Posts: 45
Joined: Wed Aug 30, 2017 4:56 am

Re: generate log file

Postby kishan patel » Mon May 28, 2018 9:35 am

Hello Fly135,
Actually i want to generate file on board means esp32. After some time which can be accessible.
Regards,
Kishan Patel.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: generate log file

Postby fly135 » Mon May 28, 2018 4:56 pm

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

meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

Re: generate log file

Postby meneldor » Tue May 29, 2018 5:31 am

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.

kishan patel
Posts: 45
Joined: Wed Aug 30, 2017 4:56 am

Re: generate log file

Postby kishan patel » Wed May 30, 2018 4:51 am

Hello,
Thanks for reply. Is there any example available for log file?

Regards,
Kishan Patel.

aelsayedhamouda
Posts: 6
Joined: Mon Jul 06, 2020 11:28 pm

Re: generate log file

Postby aelsayedhamouda » Wed Mar 31, 2021 7:11 pm

idf.py -p port monitor | tee run.log

bhavin.kaneria
Posts: 1
Joined: Wed Nov 09, 2022 6:06 am

Re: generate log file

Postby bhavin.kaneria » Wed Nov 09, 2022 8:28 am

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.

Who is online

Users browsing this forum: Corand, ESP_Sprite and 74 guests