-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Is it possible to output LOGS or debug messages to a SPIFFS file that’s inside the ESP32? #2581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
i quote, also I need to redirect to my net serial logs |
Same for me |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Were there any updates about this topic in the last two years? I really want to make my esp32 completely wireless and having the opportunity to just post the logs to a Webserver would be fantastic |
I couldn't find any SYSTEM logs that I could output. The verbose debug messages will be outputted on the terminal like always, but I've made myself some custom messages throughout the code which I output like PLACEHOLDERS in a web-page using template processing from me-no-dev's ESPAsyncWebServer. First I made a global variable in which I can store multiple messages:
Then you use a circular buffer to constantly add messages to
After that you make a function that pushes the message in the buffer and also outputs it in the terminal:
Further, you tell the template processor to replace the placeholder with your
Next, you make WebServer handlers with template processor:
In your web-page,
Next, create a JQuery script that periodically replaces the logs:
The trick is that Looking at it I am sure it can be vastly improved and made faster, but I am too lazy to change something that works. |
See #4346 |
Hardware:
Board: ESP32 DEVKIT1
Core Installation version: 1.0.1-git this one
IDE name: PlatformIO IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Linux Mint 19.1 Mate
Let's say that the ESP is installed at a location and after some time in use it crashes. I would like to access some logs to see what happened and to be able to debug it.
I am trying to output debug messages to a SPIFFS file so that I can then access it via a HTML page or by just following the address: http://myIP/events
This is my sketch:
And it outputs:
So it outputs
text!
.From what I've been told:
So is there any fix ? Or it just won't happen ?
And if this method doesn't work, how can I output debug messages or logs so that I can access them without a Serial Monitor ?
Thank you !
The text was updated successfully, but these errors were encountered: