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

ensure short_message is not empty + add extra fields #233

Merged
merged 1 commit into from
Apr 15, 2018
Merged

ensure short_message is not empty + add extra fields #233

merged 1 commit into from
Apr 15, 2018

Conversation

vise890
Copy link
Contributor

@vise890 vise890 commented Jun 7, 2017

Gelf really dislikes empty short_messages:
http://docs.graylog.org/en/2.2/pages/gelf.html#gelf-payload-specification

If short_message is not set (or it is an empty string), the message will not
appear in the logs altogether.

This PR ensurest that short_message is never empty. The exception's message is used if it is present, failing that (for the degenerate case of calling (log/info "")), the string "EMPTY MSG" is used instead.

I also added a few extra fields.

Gelf really dislikes empty `short_message`s:
http://docs.graylog.org/en/2.2/pages/gelf.html#gelf-payload-specification

If `short_message` is not set (or is an empty string), the message will not
appear in the logs altogether.
@ptaoussanis
Copy link
Member

Thanks Martino!

@ptaoussanis ptaoussanis merged commit d74b6f0 into taoensso:master Apr 15, 2018
ptaoussanis pushed a commit that referenced this pull request Apr 15, 2018
… + add extra fields (@vise890)

Gelf really dislikes empty `short_message`s:
http://docs.graylog.org/en/2.2/pages/gelf.html#gelf-payload-specification

If `short_message` is not set (or is an empty string), the message will not
appear in the logs altogether.
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

Successfully merging this pull request may close these issues.

2 participants