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

Slack Plugin Message Formatting #764

Closed
kacrouse opened this issue Sep 11, 2024 · 3 comments · Fixed by #765
Closed

Slack Plugin Message Formatting #764

kacrouse opened this issue Sep 11, 2024 · 3 comments · Fixed by #765
Assignees
Labels
Plugin: Slack Type: Bug Something isn't working

Comments

@kacrouse
Copy link
Contributor

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

v4.14.7, slack plugin v1.5.3

New Bug Summary

The stack trace shown in slack messages logged by the slack plugin don't format properly because they are multi-line, but single backticks are used. See image below

image

I think I found the issue in the line below—the two criteria for isShort should be combined via AND rather than OR. I think anytime you have multiline text you'd want to use triple backticks rather than single.

fieldDto.isShort = stringValue.contains('\n') == false || stringValue.length() <= maxShortLength;

With that change, the slack message looks like
image

Pretty small update, but happy to submit a PR if you agree with the change!

@kacrouse kacrouse added the Type: Bug Something isn't working label Sep 11, 2024
@jongpie
Copy link
Owner

jongpie commented Sep 16, 2024

@kacrouse thanks for reporting this! I think your change makes sense, it should be && instead of ||. I have another PR open right now (PR #765), so I can just include this one-line fix as part of that PR. I'm planning to merge it today or tomorrow - I'll include a new package version for Slack plugin in the release notes.

@jongpie jongpie self-assigned this Sep 16, 2024
jongpie added a commit that referenced this issue Sep 16, 2024
…rt' boolean, used to determine how to format long text blocks & blocks with line breaks
@kacrouse
Copy link
Contributor Author

Amazing, thanks!

@jongpie
Copy link
Owner

jongpie commented Sep 17, 2024

@kacrouse this is now fixed - the new package version ID for the plugin is 04t5Y0000015oTTQAY. It's also mentioned the v4.14.10 release notes.

Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin: Slack Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants