[Bug 238345] usr/bin/logger: Old syslog format when using remote host option (-h)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jun 5 17:50:14 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238345

            Bug ID: 238345
           Summary: usr/bin/logger: Old syslog format when using remote
                    host option (-h)
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: zeising at FreeBSD.org

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?

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list