Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Gary Gregory
I was talking about submitting a PR to the Cassandra project to add a getter. Gary On Mon, Mar 14, 2022, 17:02 Piotr P. Karwasz wrote: > On Mon, Mar 14, 2022 at 9:47 PM Gary Gregory > wrote: > > > > Time add a better to Cassandra in a PR! ;-) > > I took my chances pushing the commit directly a

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Matt Sicker
If you're trying to test how CI handles a commit, then yeah, file a PR. Those PR builds are the same as a commit build. On Mon, Mar 14, 2022 at 4:02 PM Piotr P. Karwasz wrote: > > On Mon, Mar 14, 2022 at 9:47 PM Gary Gregory wrote: > > > > Time add a better to Cassandra in a PR! ;-) > > I took m

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Piotr P. Karwasz
On Mon, Mar 14, 2022 at 9:47 PM Gary Gregory wrote: > > Time add a better to Cassandra in a PR! ;-) I took my chances pushing the commit directly and it failed on MacOS (but retrieved the ephemeral port correctly), ;-(. Next time I'll opt for a PR. Maybe the timeout is the issue. The MacOS machin

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Gary Gregory
Time add a better to Cassandra in a PR! ;-) Gary On Mon, Mar 14, 2022, 15:31 Piotr P. Karwasz wrote: > On Mon, Mar 14, 2022 at 11:19 AM Gary Gregory > wrote: > > Using 0 to get an ephemeral is guaranteed to work (until the OS runs out > of > > ports). Using AvailablePortFinder does not guarant

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Piotr P. Karwasz
On Mon, Mar 14, 2022 at 11:19 AM Gary Gregory wrote: > Using 0 to get an ephemeral is guaranteed to work (until the OS runs out of > ports). Using AvailablePortFinder does not guarantee anything IIRC. Isn't > there a (small) chance that someone else on the machine can use that port > before we do?

Re: Order of property sources

2022-03-14 Thread Piotr P. Karwasz
On Mon, Mar 14, 2022 at 10:54 AM Volkan Yazıcı wrote: > Regarding your remark about providers... `Provider#getPriority()` has the > following javadoc: *"Gets the priority (natural ordering) of this Provider"*, > hence I would have expected it to work the same lowest-comes-first way, but > apparent

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Gary Gregory
Using 0 to get an ephemeral is guaranteed to work (until the OS runs out of ports). Using AvailablePortFinder does not guarantee anything IIRC. Isn't there a (small) chance that someone else on the machine can use that port before we do? Assuming there is an API that says 'this is my actual port' i

Re: Order of property sources

2022-03-14 Thread Volkan Yazıcı
Okay, then we have consensus for changing the property source priority field handling to lowest-comes-first strategy. I recommend landing this feature in 2.18.0 rather than 2.17.3 or something, since this is potentially a breaking change of a not working feature. Regarding your remark about provid

Re: Order of property sources

2022-03-14 Thread Piotr P. Karwasz
Hi Volkan, On Mon, Mar 14, 2022 at 9:23 AM Volkan Yazıcı wrote: > My preference would be the *lowest-value-comes-first* strategy for the > following reasons: > >- Natural ordering in Java (e.g., `Stream#sorted()`) yields the same >result >- This is how it works for Spring's `@Order` a

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Volkan Yazıcı
Doh! I was responding to Gary's remark but after checking the diff in more detail, indeed there are no fixed ports anywhere. On the contrary, this commit addresses that issue. On Mon, Mar 14, 2022 at 9:22 AM Piotr P. Karwasz wrote: > On Mon, Mar 14, 2022 at 1:18 AM Gary Gregory > wrote: > > > >

Re: Order of property sources

2022-03-14 Thread Volkan Yazıcı
My preference would be the *lowest-value-comes-first* strategy for the following reasons: - Natural ordering in Java (e.g., `Stream#sorted()`) yields the same result - This is how it works for Spring's `@Order` annotation I would appreciate it if you can align javadoc and manual with thi

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Piotr P. Karwasz
On Mon, Mar 14, 2022 at 1:18 AM Gary Gregory wrote: > > Can't we use an ephemeral port here? I am not sure I understand: `AvailablePortFinder` does return a port in the ephemeral range. Piotr > > Gary > > On Sun, Mar 13, 2022, 19:14 wrote: > > > This is an automated email from the ASF dual-hos

Re: [logging-log4j2] branch release-2.x updated: Switches Cassandra to random port

2022-03-14 Thread Volkan Yazıcı
We indeed can and should! Piotr, see `JsonTemplateLayoutNullEventDelimiterTest` and `nullEventDelimitedJsonTemplateLayoutLogging.xml` for inspiration. On Mon, Mar 14, 2022 at 1:18 AM Gary Gregory wrote: > Can't we use an ephemeral port here? > > Gary > > On Sun, Mar 13, 2022, 19:14 wrote: > >