-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Streamable interface for SAX-style message rendering #18
base: master
Are you sure you want to change the base?
Conversation
I believe this PR is resolved by other means in #17, hence I am closing it. Feel free to poke me if you think otherwise. |
Not entirely. It's still useful to have a SAX-style interface by which the Layout can stream JSON events to the Appender. |
@mkedwards, ok, then I am re-opening it. |
I've rebased in the |
I found these two particularly useful:
The rest looks to be nexia-specific to me. |
The Streamable interface is intended to be generally useful, especially if it's adopted by log4j2 upstream. See https://github.com/nexiahome/formatted_data_message/blob/logstash-streamable/src/main/java/org/apache/logging/log4j/message/lazy/FormattedDataMessage.java#L552 for how we implement |
But now that you have the JsonGenerator streaming mechanism in the LogstashLayout resolver, I think you want a87707f instead of the implementation in this PR. |
That, plus the two commits you identified, are indeed all the substance of that branch. |
And what I meant was that it's still useful to have a SAX-style interface by which the Message can stream JSON events to the Layout. 😝 |
Again, context in case it's helpful: we're using this together with some
If we can determine from the log-site-specific marker (using This is of course considerably more verbose at the log site than I'd like it to be. We're just in the process of introducing Markers to our code base; the Marker is effectively a lookup key for the log level, message ID, and message type. So I expect to provide syntactic sugar that looks like:
Here |
dffdd89
to
9aac8ea
Compare
A step towards the message streaming interface proposed in #17.