-
Notifications
You must be signed in to change notification settings - Fork 12
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
Idea/request: Syslog compatibility #24
Comments
Thanks for the suggestion. The syslog format, especially the log format that requires timestamps, is not the same on all platforms, so it would be difficult for the library to support it on all platforms. Having them create it themselves in a custom format would be better. |
Thanks for getting back on this topic. I was under the impression that the syslog format was standardized according to https://datatracker.ietf.org/doc/html/rfc5424 but I might very well be naive here. Regardless, would you care to elaborate on your last sentence with regards to a custom format. Do you mean there is already a preferred way of extending DebugLog with another custom logging format/transport? |
Ah, yes, thanks. That makes perfect sense for the formatting part. But I am still unsure about how to use a custom transport (or sink if you will) for all log messages. Right now, I believe there are two implementations, to a serial port and to a file. How would I go about pushing the log messages over UDP instead/also? |
You can attach any LOG_ATTACH_SERIAL(&Serial2);
LOG_ATTACH_SERIAL(&your_udp_client);
LOG_ATTACH_SERIAL(&your_tcp_client); |
v0.8.4 adds LOG_ATTACH_STREAM(your_udp_client); |
Oh, that makes sense now that I see your examples, awesome! And, yes, the additional "overload" introduced in 0.8.4 makes it a lot clearer 👍 Feel free to close this issue and thanks for your quick and helpful response! |
First, thanks for this awesome library!
In a similar manner as the file logging functionality, it would be really useful to have an optional syslog "logger" which sends all log messages in Syslog format over UDP.
The text was updated successfully, but these errors were encountered: