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

Add flag to disable Level field in message #52

Open
101100 opened this issue Aug 10, 2020 · 5 comments
Open

Add flag to disable Level field in message #52

101100 opened this issue Aug 10, 2020 · 5 comments

Comments

@101100
Copy link

101100 commented Aug 10, 2020

Would you accept a pull request to add a flag to disable the Level field in the message? I'm thinking of a bool flag just before ExcludePropertyInformation that, if set, will skip this line:

special.Fields.Add(new SlackMessageAttachmentField("Level", evt.Data.Level.ToString(), @short: true));

@nblumhardt
Copy link
Collaborator

Hi Jason,

Just to understand your scenario better - why do you want to exclude Level?

Best regards,
Nick

@101100
Copy link
Author

101100 commented Aug 11, 2020

We are just trying to reduce the size of messages in our Slack channel. The channel only gets errors, so the level information is redundant and since it is its own field, it takes up a fair bit of space. The reason we noticed this is that we recently started using "Included properties" to trim the messages down (really nice, BTW), and this one last bit of information that we don't need is now more obvious.

@nblumhardt
Copy link
Collaborator

Cool, thanks for the feedback! Will give this some thought 👍

@101100
Copy link
Author

101100 commented Aug 11, 2020

I'm willing to do the P/R. I just like to ask before doing the work.

@nblumhardt
Copy link
Collaborator

Thanks! I'm just wondering whether there's a more compact way for us to include the information, which would cut down noise in the message for everybody, and avoid the need for a switch.

Currently the level influences message coloring, but that might not quite be enough for everyone - any thoughts? We do use coloring only in the messages generated from alerts, so there's some precedent for just leaving it out....

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

No branches or pull requests

2 participants