Skip to content

Uniformise %ex pattern and exception JTL resolver #3623

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

Open
ppkarwasz opened this issue Apr 17, 2025 · 0 comments
Open

Uniformise %ex pattern and exception JTL resolver #3623

ppkarwasz opened this issue Apr 17, 2025 · 0 comments

Comments

@ppkarwasz
Copy link
Contributor

Description

Currently there is a difference in the way exceptions are formatted by the %ex pattern converter and the following JSON Template Layout snippet:

{
  "$resolver": "exception",
  "field": "stackTrace",
  "stackTrace": {
    "stringified": true
  }
}
  • JTL simply uses Throwable.printStackTrace() and the first line of the output is obtained by calling Object.toString().
  • Pattern Layout uses getClass().getName() + ": " + getLocalisedMessage().

Those lines agree, unless an exception overrides Object#toString().

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

No branches or pull requests

1 participant