Replies: 1 comment
-
Sample applications and test code does tend to use If you want all debug output sent to a particular stream you can do something like this:
Within your application you can use NB. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sming logging is, as far as I can tell, entirely based around the Serial device.
Since most devices are probably not connected to a serial terminal, that might not always be ideal.
Tasmota, as an example, supports udp Syslog, file Log and a few more. Much of Sming's logging is, as far as I can see, compile time (like setting the loglevel to print)
I have looked into it a bit and my thoughs were:
we could have a Stream class that accepts writes and sends it to a number of (runtime configurable) Streams which could be Serial or any other stream and use that as the target for
m_setPuts
as receiver streams, it would be great to have streams sending to remote Syslog, websocket (that might already be possible) and a limited size file that circularly overwrites older content.
I'm not really sure about the latter, as it would potentially put a lot of write load on the flash chip.
This last part might already be possible using DataLog.
I have had issues in the past where users reported bugs but since they could not provide logs, I was not really able to understand what was going on on their end.
Ideally, but I think this would be more difficult to do, the log level could be set separately for every output stream such that writing to file would not be too overwhelming while, for example, writing to rsyslog could be much more verbose
I hope I have not overlooked something and wonder if it's worth working on this.
Beta Was this translation helpful? Give feedback.
All reactions