Comments (3)
I just wanted to raise the issue early so that the Boot team can make that decision early whether or not it would be provided by Boot. And also extend to others such as GSON.
OK, Thanks! that makes sense.
We did discuss some of this during the preliminary design meetings. Our feeling is that we should offer basic support for ECS and Logstash out-of-the-box, but also allow users to plug-in their own formats if ours aren't working out for them. For the formats we support, we think that the JsonWriter
is the correct approach since it supports all that we need and will always produce the same output.
When it comes to developing your own StructuredLogFormatter
, you have much more choice because you know the technology you're using. E.g. If you're a company that uses GSON, you're free to using that in your own StructuredLogFormatter
implementation. This is similar to the design choice we made to make StructuredLogFormatter
take a generic <E>
log event type. We've had to develop two versions of each StructuredLogFormatter
we support (one for logback and one for Log4j2). We expect that users will have standardized on a single logging system so will only need to develop a single custom StructuredLogFormatter
.
So in summary, we're trying to hit a sweet spot where we can provide a good initial experience, but still allow customization. I think that using Jackson or GSON belongs in the customization bucket, so isn't something we should consider right now.
from spring-boot.
it may not be entirely possible to use the application's
ObjectMapper
bean
I don't think it will unfortunately, not without the risk of unwanted side-effects. Out of interest, why would you want to use Jackson? We hoped that way the JSON is written would be an implementation detail that users wouldn't need to worry about.
from spring-boot.
I just wanted to raise the issue early so that the Boot team can make that decision early whether or not it would be provided by Boot. And also extend to others such as GSON.
So then this issue could be used to point back to the reason why it was declined (or not). And allow search.
Currently, my team's APIs don't do any advanced logging or anything really, so Boot's JsonWriter
works just fine so far.
from spring-boot.
Related Issues (20)
- Context not propagated in a reactive programming, OpenTelemetry context is not available HOT 1
- BeanCreationException during Spring Boot Application Startup after Migration to Spring Boot 2.6 HOT 1
- Use FileSystemOperations rather than Project's sync and copy
- Use FileSystemOperations rather than Project's sync and copy
- Use ArchiveOperations rather than Project's zipTree
- Use ArchiveOperations rather than Project's zipTree
- Spring Boot Redis - always getting could not get resource from pool HOT 4
- Gradle Plugin AOT documentation has sample error
- Spring Boot Webflux: Redis clean up evicter function not working HOT 3
- Spring Boot - Redis Sessions not being properly deleted HOT 2
- Basic sb
- Gradle Plugin AOT documentation has sample error
- Clarify purpose of Pulsar consumer subscription related properties HOT 6
- Investigate how log correlation IDs work with structured logging HOT 4
- Using an empty string MongoDB 'replica-set-name' property will result in ClusterType=REPLICA_SET HOT 5
- Health probes response changes when additional-path specified HOT 3
- Returning additional DataBuffer in RestController corrupts following request for WebTestClient HOT 1
- Using an empty string MongoDB 'replica-set-name' property will result in ClusterType=REPLICA_SET
- Using an empty string MongoDB 'replica-set-name' property will result in ClusterType=REPLICA_SET
- Interface SslStoreProvider replacement in Spring boot 3.3.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.