Skip to content

Take Throwable#toString() into account while rendering stack traces in Pattern Layout#4033

Merged
vy merged 5 commits intoapache:2.xfrom
JongminChung:fix/#4019
Mar 5, 2026
Merged

Take Throwable#toString() into account while rendering stack traces in Pattern Layout#4033
vy merged 5 commits intoapache:2.xfrom
JongminChung:fix/#4019

Conversation

@JongminChung
Copy link
Contributor

@JongminChung JongminChung commented Jan 23, 2026

Align renderThrowableMessage(...) to use Throwable.toString(), restoring the default printStackTrace() behavior documented for the %ex converter.


Checklist

  • Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise
  • ./mvnw verify succeeds (the build instructions)
  • Non-trivial changes contain an entry file in the src/changelog/.2.x.x directory
  • Tests are provided

@JongminChung
Copy link
Contributor Author

Hi, @vy

Would love to get your eyes on this when you get a moment.
Let me know if any changes are needed. Thanks!

Copy link
Member

@vy vy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a changelog entry and make sure ./mvnw verify -pl :log4j-core,:log4j-core-test passes, please?

@github-project-automation github-project-automation bot moved this to Changes requested in Log4j pull request tracker Feb 16, 2026
@vy
Copy link
Member

vy commented Feb 16, 2026

Could you replace the entire AI slop description with a short meaningful summary, please?

@github-actions
Copy link

github-actions bot commented Feb 16, 2026

Job Requested goals Build Tool Version Build Outcome Build Scan®
build-macos-latest clean install 3.9.8 Build Scan PUBLISHED
build-ubuntu-latest clean install 3.9.8 Build Scan PUBLISHED
build-windows-latest clean install 3.9.8 Build Scan PUBLISHED
Generated by gradle/develocity-actions

Signed-off-by: Jongmin Chung <chungjm0711@gmail.com>
Signed-off-by: Jongmin Chung <chungjm0711@gmail.com>
@JongminChung
Copy link
Contributor Author

Could you replace the entire AI slop description with a short meaningful summary, please?

As this is my first PR, I wanted to provide more background context. I've shortened it now.
Thanks for the thorough review!

Copy link
Member

@vy vy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JongminChung, thanks for the update.

Please, don't ever force-push. It completely nukes all the conversation history.

Would you also mind adding a changelog entry file, please?

@vy vy changed the title fix: Pattern Layout throwable use Throwable.toString() Take Throwable#toString() into account while rendering stack traces in Pattern Layout Feb 28, 2026
Signed-off-by: Jongmin Chung <chungjm0711@gmail.com>
@JongminChung
Copy link
Contributor Author

@JongminChung, thanks for the update.

Please, don't ever force-push. It completely nukes all the conversation history.

Would you also mind adding a changelog entry file, please?

Sorry, I deleted them thinking they were unnecessary commitments through force-push, but I overlooked that the context of the previous conversation disappeared.

Regarding the changelog you requested, I will read the document and write it.

Thank you for reviewing it in detail every time.

Signed-off-by: Jongmin Chung <chungjm0711@gmail.com>
@github-project-automation github-project-automation bot moved this from Changes requested to Approved in Log4j pull request tracker Mar 2, 2026
@vy vy merged commit d46918c into apache:2.x Mar 5, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Log4j pull request tracker Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants