Re: [Chainsaw] JSON Support

2021-06-19 Thread Robert Middleton
I've added some basic JSON support to Chainsaw: https://github.com/apache/logging-chainsaw/pull/9 It is a little funny to work with though, because of how Chainsaw works it is tightly tied to Log4j1 messages, so all we're really doing is extracting the parts that we care about and putting it into t

Re: Bazel for builds

2021-06-19 Thread Ralph Goers
> On Jun 19, 2021, at 11:42 AM, Volkan Yazıcı wrote: > > Why do we need both a -test and -unittest modules? Can't we configure > surefire and failsafe to simply run the tests in the "main" of -test module? a) The way Maven currently supports JPMS unit testing I can’t be sure that placing the

Re: Bazel for builds

2021-06-19 Thread Volkan Yazıcı
Why do we need both a -test and -unittest modules? Can't we configure surefire and failsafe to simply run the tests in the "main" of -test module? A back of the envelope calculate yields the following: $ grep 'test-jar' -RHn . -C 3 | grep 'log4j' | sed -r 's/.*(.*)<\/artifactId>/\1/g' | sort | un

Re: Bazel for builds

2021-06-19 Thread Ralph Goers
If you did that then it would require that instead of the Log4j-api module producing the log4j-api jar and log4j-api test jar you would end up with * log4j-api - with no tests. * log4j-api-test - creates the test jar. * log4j-api-unittest - contains and runs the unit tests. I’d rather live with

Re: Bazel for builds

2021-06-19 Thread Matt Sicker
I think the idea would be to separate the reusable test code into their own main modules which depend on JUnit and such which are only consumed by test modules. I think this approach could potentially work, but we’d end up with a few more published jars. On Sat, Jun 19, 2021 at 11:28 Ralph Goers

Re: Bazel for builds

2021-06-19 Thread Ralph Goers
> On Jun 19, 2021, at 3:45 AM, Volkan Yazıcı wrote: > > That README is such a gem Ralph! Thanks for documenting all that suffering. > (README says Log4j 2 supports JPMS, shouldn't it rather be Log4j 3?) No, I consider it Log4j 2 version 3.0. IOW, the 2 is just part of the name. I can see wh

Re: Bazel for builds

2021-06-19 Thread Volkan Yazıcı
That README is such a gem Ralph! Thanks for documenting all that suffering. (README says Log4j 2 supports JPMS, shouldn't it rather be Log4j 3?) There are actually pretty few modules whose test JARs are used by the downstream, mostly by log4j-perf. Could it be a viable option to move the benchmark

Re: [Chainsaw] JSON Support

2021-06-19 Thread Volkan Yazıcı
For the records, JsonTemplateLayout also quotes all escape characters, including CR and LF characters, in every(!) string value. For instance, the following test succeeds: String eventTemplate = writeJson(asMap( "epochSecs", asMap( "$resolver", "exception", "field", "st