-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
(doc) Clarify the usage of parameterized logging in Log4j 2 API
page
#1918
Comments
Not only @jvz but also general documentation - assigned myself too |
It would be good to expand on this a bit more, perhaps something like:
An MCVE would probably be appropriate here to show the (likely unintended) behavior. |
If this refers to void info(String message, Object p0), then the JavaDoc is misleading. In fact, if |
That's more of a problem if you mix parameterized logging and concatenated strings. If there are no parameters given, then no parameterized placeholders will be replaced. |
Fixed by several changes implemented for #2535. |
As far as I can see this fully persists, but I assume @vy meant that a fix is underway in the staging area. The new Don’t use string concatenation section does improve, but is far from being as clear as @ppkarwasz's suggestion. |
The Log4j 2 API documentation page could be improved to state that:
LogManager.getFormatterLogger(Class)
withLogManager.getLogger(Class, MessageFormatter)
, which is more generic.The text was updated successfully, but these errors were encountered: