remote_syslog_logger icon indicating copy to clipboard operation
remote_syslog_logger copied to clipboard

Default :local_hostname should be FQDN

Open jscheid opened this issue 10 years ago • 7 comments

RFC 5424 says that the hostname should be fully-qualified. The default hostname is currently determined using Socket.gethostname, which returns the unqualified hostname. It should use something like this instead to determine the FQDN.

jscheid avatar Jan 06 '15 13:01 jscheid

Good catch, @jscheid. There's two mitigating reasons not to change that I'd welcome your thoughts on, namely:

  • compatibility with syslog daemons often used for sending OS logs (concurrent with this gem). rsyslog, at least in older versions, actually uses the first entry for 127.0.0.1 in /etc/hosts. That's typically not qualified.
  • not changing sender identifiers underneath existing users when they upgrade

troy avatar Jan 06 '15 15:01 troy

You're always going to be incompatible with somebody, in fact what prompted this ticket was the fact that logback has the FQDN hardwired.

I understand you don't want to change the default behaviour (and I reckon you don't want to bump the major version just for this). How about a new parameter :use_fqdn that defaults to false?

jscheid avatar Jan 06 '15 15:01 jscheid

Seems reasonable to me. Any interest in implementing this?

troy avatar Jan 06 '15 17:01 troy

Great. Sure, but it would be nice to get my other PR out of the way first. Is there anything holding it up?

jscheid avatar Jan 06 '15 17:01 jscheid

I agree. The only thing it's blocking on is having enough time to give it the thoughtful review (with an eye towards unexpected consequences) that it deserves. I can't commit to when that will be, but it won't be months :)

troy avatar Jan 06 '15 18:01 troy

Fair enough, I know the feeling :-) Let's leave it at this for now. I might send over a PR for this as well when I find time. Thanks @troy!

jscheid avatar Jan 06 '15 18:01 jscheid

Sounds good all around. Your comment kickstarted a discussion on the other PR, so you'll probably see something on that this week. I appreciate the TLC.

troy avatar Jan 06 '15 18:01 troy