Re: log4j2 2.14.0 and the mongodb4 appender

2021-03-08 Thread Julian Woodward
Perhaps it would help if I explain the scenario better. In this application, the MongoDB credentials are not known at design time, nor are they known immediately at start-up time. They're only known when the application has started and has had a chance to go and retrieve them from a secure

Re: log4j2 2.14.0 and the mongodb4 appender

2021-03-08 Thread Gary Gregory
Sure I know that, I just don't recall if I accounted for $$ in the code for MongoDB... G ;-) I'll peek tonight. On Mon, Mar 8, 2021 at 2:40 PM Ralph Goers wrote: > > Gary - the $$ form requires that the component call StrSubstitutor to resolve > the variables. If the application needs to do

Call for Presentations for ApacheCon 2021 now open

2021-03-08 Thread Rich Bowen
[Note: You are receiving this because you are subscribed to a users@ list on one or more Apache Software Foundation projects.] The ApacheCon Planners and the Apache Software Foundation are pleased to announce that ApacheCon@Home will be held online, September 21-23, 2021. Once again, we’ll be

Re: log4j2 2.14.0 and the mongodb4 appender

2021-03-08 Thread Ralph Goers
Gary - the $$ form requires that the component call StrSubstitutor to resolve the variables. If the application needs to do that for some reason then the Appender would need to support it. Ralph > On Mar 8, 2021, at 9:46 AM, Gary Gregory wrote: > > What Ralph said :-) > > The tests in Log4j

Re: log4j2 2.14.0 and the mongodb4 appender

2021-03-08 Thread Gary Gregory
What Ralph said :-) The tests in Log4j as well as the ones I have at work all use one $ in connection strings. I do not have tests that use $$. Gary On Mon, Mar 8, 2021, 11:13 Ralph Goers wrote: > If I understand what Gary is saying correctly is that you would configure > your Log4j2.xml

Re: log4j2 2.14.0 and the mongodb4 appender

2021-03-08 Thread Ralph Goers
If I understand what Gary is saying correctly is that you would configure your Log4j2.xml file with the connection string for MongoDB. In the connection string you would have variables. If the variable is of the form ${varName} then it will be resolved when the configuration is processed. If a

Re: log4j2 2.14.0 and the mongodb4 appender

2021-03-08 Thread Julian Woodward
Hi Gary It's been a while, but I'm trying this now. I don't understand where the opportunity is to inject values in the way you're describing (the $$ approach) when log4j2 is being instantiated at startup time by Spring. By the time we reach 'my' code, it's too late and the mongodb4 setup has