-
Notifications
You must be signed in to change notification settings - Fork 148
Logging abstraction #123
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
@kasedy I'm going to start working on this - it sounds fun. Let me know if you had any particular things on your wishlist that I havent mentioned above. I'm only going to implement the SerialAppender for now - of course leaving it open so we can add more later. |
Class/function tracking could be implemented with __PRETTY_FUNCTION__, __FUNCTION__, __func__. I also suggest on looking into RemoteDebuglibrary source code as a good example. |
Thanks @kasedy |
Having a play around with this, with some progress. Bear in mind it's a rough draft. I've been looking at logging over WebSockets and EventSources and I have some suff in a branch over here: https://github.com/rjwats/esp8266-react/tree/logging-spike Having some stability issues, and I'm wondering how best to deal with the synario of logging messages being created at too fast a rate for the buffers to keep up (doing an OTA update for example). There's also the matter of wanting to see logs you may have missed due to the the device re-connecting or restarting. The network connection doesn't always exist... Tomorrow I'm going to look at file system logging. I think a combination of a small filesystem buffer and EventSource might make a robust solution. |
this would a great addition. I did an adaption last year using an external log library (see #85 (comment)) which writes to any stream including syslog. It's both non-blocking and thread-safe and I've been using it on all my projects without any issues so far. Initially, I had a home-grown rotating file log in SPIFFS but got scared about the wear. Now I also included a 50-line internal buffer so if there is a network drop or crash you could still figure out where it flunked. Happy to contribute if you need help with your version. |
Exception 3, Exception 9 and Exception 28 are thrown sporadically if printing to serial during WebSocket RX Believed to be due to serial buffer causing RX to block, investigating as part of #123
Exception 3, Exception 9 and Exception 28 are thrown sporadically if printing to serial during WebSocket RX Believed to be due to serial buffer causing RX to block, investigating as part of #123
Hi! |
It would be good to have an abstraction for logging with log levels and an appender registration mechanism. This can help us hide debug messages
Supporting:
I'm thinking moduleIds like: "System.WifiSettingsService" will do the trick, so all of the system messages can be filtered out if required.
The text was updated successfully, but these errors were encountered: