-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalArgumentException when message includes {} #401
Comments
When I first noticed this issue, the error presented as a |
Yes, this is really something related to the specific log4j impl. I don't have a good idea how to fix that (looking for {} placeholder in strings feels an overkill, as anyway we will just throw an exception). |
Is there any workaround for this or should we stay away from the version upgrade? I'd like to avoid breaking some logs for an upgrade. |
I am not sure what you're trying to upgrade: from which version to which and how does the log call changes. I suspect using a payload is what causing this, so I expect that change to be breaking anyway, and need to be tested. Can you please provide so more details? |
Hi, as you guessed, we were experimenting with a major version increment where we weren't using payloads in the past. I suppose we can still upgrade as long as we don't allow payloads, but that seems hard to enforce. |
In the following example, the first error leads to the failure:
Configuration:
It doesn't seem like the issue happens with Spring Boots default logger
spring-boot-starter-logging
(vs log4j2).I am aware this is an error arising from log4j but I'm wondering if there is something we can do for these methods to always avoid parameterized messaging. As far as I understand, we couldn't use
atInfo
to parameterize messages anyways.Example can be found here. Let me know if there's a better way to provide examples.
The text was updated successfully, but these errors were encountered: