Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Add logback encoder support and use UTF-8 encoding explicitly#11

Merged
sbialkowski-r7 merged 5 commits intorapid7:masterfrom
rillgen:logback_encoder_support
Dec 18, 2019
Merged

Add logback encoder support and use UTF-8 encoding explicitly#11
sbialkowski-r7 merged 5 commits intorapid7:masterfrom
rillgen:logback_encoder_support

Conversation

@rillgen
Copy link
Contributor

@rillgen rillgen commented Dec 17, 2019

We're using this library to push our logs using logback, and would like to send them encoded in JSON format so that we can push custom logging attributes and use them for filtering.

There are logback encoders that do this such as elastic's LogstashEncoder but unfortunately the r7insight library lacks support for these as when an Encoder is defined, it assumes that it is a PatternLayoutEncoder. This patch aims to provide generic support for any Encoder.

@sbialkowski-r7
Copy link
Contributor

Hi @rillgen, seems that this repo uses spaces, not tabs, this causes a massive diff, would you be able to reformat?

@rillgen
Copy link
Contributor Author

rillgen commented Dec 18, 2019

Hi @rillgen, seems that this repo uses spaces, not tabs, this causes a massive diff, would you be able to reformat?

Hi @sbialkowski-r7 thanks for pointing that out, I reformatted the code using spaces.

Copy link
Contributor

@sbialkowski-r7 sbialkowski-r7 left a comment

Choose a reason for hiding this comment

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

lgtm

@rillgen rillgen requested a review from jcolgan-r7 December 18, 2019 12:39
Co-Authored-By: James Colgan <30832432+jcolgan-r7@users.noreply.github.com>
rjacobs-r7
rjacobs-r7 approved these changes Dec 18, 2019
Copy link
Contributor

@rjacobs-r7 rjacobs-r7 left a comment

Choose a reason for hiding this comment

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

Can someone make sure to apply Git tags and submit to Maven Central after merge?

@sbialkowski-r7 sbialkowski-r7 merged commit 2f180aa into rapid7:master Dec 18, 2019
@sbialkowski-r7
Copy link
Contributor

@rillgen Thanks so much for contributing to our repo, we really appreciate it!

@rillgen rillgen deleted the logback_encoder_support branch December 18, 2019 16:24
maquilanti-r7 pushed a commit to maquilanti-r7/r7insight_java that referenced this pull request Jan 23, 2020
)

* Add logback encoder support and use UTF-8 encoding explicitly

* Reformat code using spaces instead of tabs

* Bump patch version

* Using Charset constructor in order to avoid encoding check

* Fix generics styling

Co-Authored-By: James Colgan <30832432+jcolgan-r7@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants