Forgive me if this feature already exists, but I was hoping to find if
log4j 2 contained a way to configure the format *provider* of
parametrized messages. This is an important aspect for my own work
because I have some sophisticated formatting in my logs that use
String.format() [1] -- especially for floating point values like
currency.

Rather than:
logger.debug("Logging in user {} with id {}", user.getName(), user.getId());

I would like some more complexity like:
logger.debug("Logging in user {%s} with id {%10s}", user.getName(),
user.getId());

I am eager to hear any opinions on my proposed feature.

[1] http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to