About a year ago, syslogd(8) and subsequently syslog(3) grew the feature to handle rfc5424 syslog formats. logger(1) is a small CLI interface to syslog(3), with which you can generate log messages to either log locally, or remotely.
When using logger without the -h option, it uses the syslog(3) libc interface to format and send a log message to the default place, usually a socket /var/run/log, on which syslogd(8) listens. Since syslog(3) generates rfc5424 compliant messages, this will also be rfc5424 compliant.
When using logger with the -h option, to send logs to another machine, or another local socket, logger(1) formats the message in a non-rfc5424 compliant manner. This causes a lot of confusion, since the behavior is quite different depending on whether -h is used or not.
I would like to see that logger(8) grew the ability to generate rfc5424 messages in all cases, but I'm unsure about how to proceed. One idea is to simply take the code from syslog(3) (really vsyslog1()) which generates rfc5424 compliant messages, and put that in logger(1). Another idea is to make the rfc5424 message generator a function in either libc or another library, for both syslog(3) and logger(1) (and possibly others) to consume. Which way is best?