Hello everyone, Here's an initial implementation! There are two PRs:
1) RFC 5424 support in the syslog kernel driver: https://github.com/apache/nuttx/pull/16493 2) syslogd application for transmitting RFC 5424 compatible messages over the network: https://github.com/apache/nuttx-apps/pull/3090 I'm happy to say that it's been working very well so far, I've tested using WireShark and a syslog server implementation in Python that I found, and both are able to successfully parse and collect syslogs generated both on the simulator and the Pi Pico W. This might prove itself super useful on other systems I'm working on, so I hope other people can find it useful too. I would appreciate any reviews or suggestions on the implementation. The last thing I'm struggling with is getting `syslogd` to run itself as a background process by default when the command is executed. I've only been able to achieve that by running the command in NSH with a trailing `&`. Best, Matteo On Sat, Jun 7, 2025 at 11:46 PM Xiang Xiao <xiaoxiang781...@gmail.com> wrote: > On Sun, Jun 8, 2025 at 7:52 AM Matteo Golin <matteo.go...@gmail.com> > wrote: > > > > > The central collection that passes on further to other sinks is a good > > idea, but I think it would be difficult to implement. The devices I was > > thinking of using this on are RPi Pico Ws, so I'd like to minimize extra > > processing and also avoid losing log collection at boot time if possible. > > This is why drawing from ramlog was a very smart suggestion. Something > like > > ramlog but storing non-character logs would be helpful in my mind. > > > > syslog also support binary format by redirecting syslog to sched_note(ram > note): > 1.enable CONFIG_SYSLOG_TO_SCHED_NOTE > https://github.com/apache/nuttx/blob/master/include/syslog.h#L212-L221 > 2.enable CONFIG_SCHED_INSTRUMENTATION_DUMP > > > https://github.com/apache/nuttx/blob/master/include/nuttx/sched_note.h#L679-L690 > 3.enable note ram channel which is very like ramlog, but save data in > binary format: > > https://github.com/apache/nuttx/blob/master/drivers/note/Make.defs#L34-L36 > 4.enable binary by ioctl NOTERAM_SETREADMODE with NOTE_MODE_READ_BINARY > > > https://github.com/apache/nuttx/blob/master/drivers/note/noteram_driver.c#L585-L596 > 5.open /dev/note/ram, read the binary log from it and convert to RFC5424 > format >