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

Allow stacktrace processing when using structured logging #43864

Closed
michaldo opened this issue Jan 16, 2025 · 3 comments
Closed

Allow stacktrace processing when using structured logging #43864

michaldo opened this issue Jan 16, 2025 · 3 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@michaldo
Copy link
Contributor

Structured logging significantly simplifies production setup. Unfortunately, missing equivalent of ShortenedThrowableConverter is disqualifying.

It is not just readability issue. Uncontrolled stacktraces can exceed log buffer, break parsing JSON and finally "hide" from search engine
Ref: https://stackoverflow.com/questions/79294615/shortenedthrowableconverter-in-spring-boot-3-4-structured-logging

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 16, 2025
@mhalbritter
Copy link
Contributor

For reference, ShortenedThrowableConverter is from logstash-logback-encoder and can be found here.

@philwebb
Copy link
Member

Stacktrace processing was also discussed in #42486

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 21, 2025
@philwebb philwebb added this to the 3.5.x milestone Jan 21, 2025
@mhalbritter mhalbritter changed the title Enhancement: ShortenedThrowableConverter is missing in structured logging Add stacktrace processing for structured logging Jan 22, 2025
@mhalbritter mhalbritter changed the title Add stacktrace processing for structured logging Allow stacktrace processing when using structured logging Jan 22, 2025
@philwebb philwebb self-assigned this Feb 6, 2025
@philwebb philwebb modified the milestones: 3.5.x, 3.5.0-M2 Feb 11, 2025
philwebb added a commit that referenced this issue Feb 11, 2025
wilkinsona added a commit that referenced this issue Feb 11, 2025
Text blocks use \n as their separator on all platforms. Update
withLineSeparatorUsesLineSeparator() to replace \n rather than
System.lineSeparator()

createPrinterWhenStandardAppliesCustomizations() limits the length of
the output. On Windows, the default \r\n line separator uses an
extra byte per separator compared to \n. Configure the printer to use
\n as a line separator so that non-whitespace output is the same on
all platforms.

See gh-43864
nosan added a commit to nosan/spring-boot that referenced this issue Feb 12, 2025
See spring-projectsgh-43864

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
nosan added a commit to nosan/spring-boot that referenced this issue Feb 12, 2025
See spring-projectsgh-43864

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
nosan added a commit to nosan/spring-boot that referenced this issue Feb 12, 2025
See spring-projectsgh-43864

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants