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

Occasional 'UnknownHost' logs; Unreliable get-hostname. #179

Closed
dfrese opened this issue Jul 6, 2016 · 2 comments
Closed

Occasional 'UnknownHost' logs; Unreliable get-hostname. #179

dfrese opened this issue Jul 6, 2016 · 2 comments

Comments

@dfrese
Copy link

dfrese commented Jul 6, 2016

Hello,

in a long running production environment, we observed that the hostname of log messages is occasionally 'UnknownHost'. The cause is of course not timbre's fault, but I can think of three possible remedies (for us):

  1. When the lookup in get-hostname fails, use the previous cached result instead of 'UnknownHost'
  2. Add some (new?) timbre configuration setting, to set a fixed hostname
  3. Write a middleware to replace :_hostname for all messages (if that's possible).

Which one would you prefer? (We can create pull requests if desired)

David.

@ptaoussanis
Copy link
Member

Hi there, I'd suggest using a simple middleware to replace all :_hostname values using whatever strategy you'd like re: unknown hosts.

Have also broken up the current hostname stuff into smaller parts for your convenience.

Cheers!

@dfrese
Copy link
Author

dfrese commented Jul 8, 2016

Thanks!

@dfrese dfrese closed this as completed Jul 8, 2016
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