Replies: 1 comment
-
I should clarify that I was hitting the error when trying to make the PR against the 2.X branch. Will try again with the 3.0 and the log4j-mongodb package instead of log4j-mongodb4 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently with the log4j-mongodb4 provider you have to define both the database name and the collection name as part of the connectionString parameter.
I think we should allow optional params in the provider config that allow the user to define the collectionName and databaseName as independent fields instead of assuming they will always be in the connnectionString.
The logic would simply look to see if custom values for those fields existed, and if so, then use them. If not then it would use the values from the connectionString like it does today.
An advantage this would provide is that systems where the connection string might already be an environment variable (or kubernetes secret) would be able to then re-use the same ENV variable that they have defined in other places and pass it to the config. Then they can specific the specific DB and collection the appender. Currently if I want to have the connectionString as an ENV variable or secret I have to create a new entry specifically for the logging appender.
I have code for this written that i would be happy to submit as a PR if interested. MIght need some assistance in understanding why I am getting an error that ends with
Beta Was this translation helpful? Give feedback.
All reactions