UDP LogHandler?

It occurred to me that a UDP/Syslog LogHandler would be super useful. I’ve used Papertrail in the past to easily capture syslog from a variety of sources, and it would be pretty handy here, especially with a constellation of IoT devices.

I found this psyslog library, but it’s a bit frustrating to use and doesn’t seem to support an OO design. The log functions are all done with #define and I can’t get it working outside of my main .ino file (ie. in my classes). So, I was thinking about taking the core UDP/Syslog idea and implementing it as a LogHandler, potentially a subclass of StreamLogHandler, if I can figure out how to subclass/implement the Print class.

Before I head down that road:

  1. Has someone already done this? Are there other (non-serial) LogHandler implementations out there for syslog or other (easier than USB-Serial) log formats?
  2. Assuming the answer to (1) is “No”, is this a good idea?

Pinging @mdma or @peekay123

I may have to back off. My C++ skills are just not that great. I’m fairly sure it could be done by subclassing StreamLogHandler but I’m not sure how to work with the Print class.

Check out the new papertrail library.

@micahwedemeyer, if you’re looking for a syslog server, I like Kiwi. It’s a free download and runs on any Windows platform. You can always use a Mac or any Linux server was well.

If you want a simple syslog client for a Particle device, I just uploaded one. Search for “syslog” and my program should come up near the top.