Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default :local_hostname should be FQDN #11

Open
jscheid opened this issue Jan 6, 2015 · 7 comments
Open

Default :local_hostname should be FQDN #11

jscheid opened this issue Jan 6, 2015 · 7 comments

Comments

@jscheid
Copy link

jscheid commented Jan 6, 2015

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.

@troy
Copy link
Contributor

troy commented Jan 6, 2015

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

@jscheid
Copy link
Author

jscheid commented Jan 6, 2015

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?

@troy
Copy link
Contributor

troy commented Jan 6, 2015

Seems reasonable to me. Any interest in implementing this?

@jscheid
Copy link
Author

jscheid commented Jan 6, 2015

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

@troy
Copy link
Contributor

troy commented Jan 6, 2015

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 :)

@jscheid
Copy link
Author

jscheid commented Jan 6, 2015

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!

@troy
Copy link
Contributor

troy commented Jan 6, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants