You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ludovic HOCHET (JIRA)" <ji...@apache.org> on 2016/02/15 23:53:18 UTC
[jira] [Updated] (LOG4J2-1277) FormattedMessage,
MessageFormatMessage and StringFormattedMessage should support passing in a
Locale to ensure appropriate formatting
[ https://issues.apache.org/jira/browse/LOG4J2-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ludovic HOCHET updated LOG4J2-1277:
-----------------------------------
Attachment: patch-log4j2-1277.diff
Sorry, I should have included the factories as well since they are another way to call the constructors.
The attached patch-log4j2-1277.diff adds the corresponding methods to FormattedMessageFactory/MessageFormatMessageFactory/StringFormatterMessageFactory, it doesn't add the method to the MessageFactory interface as it seems (to me) inappropriate for other implementations (except LocalizedMessageFactory)
> FormattedMessage, MessageFormatMessage and StringFormattedMessage should support passing in a Locale to ensure appropriate formatting
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: LOG4J2-1277
> URL: https://issues.apache.org/jira/browse/LOG4J2-1277
> Project: Log4j 2
> Issue Type: Improvement
> Components: API
> Affects Versions: 2.6
> Reporter: Ludovic HOCHET
> Priority: Minor
> Fix For: 2.6
>
> Attachments: patch-log4j2-1277.diff
>
>
> MessageFormatMessage uses MessageFormat,format(pattern, args), StringFormattedMessage uses String.format(pattern, args) both are using the default Locale to format the numbers.
> Sometime it is desirable/needed to use a specific locale (for instance [LOG4J2-1276], or for a system running in one locale but which logs are exploited in another), therefore FormattedMessage, MessageFormatMessage and StringFormattedMessage should support passing in a Locale to ensure appropriate formatting.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org