[jboss-jira] [JBoss JIRA] (JBLOGGING-84) Configurable default Locale for Logger#getMessageLogger()

Claudio Miranda (JIRA) jira-events at lists.jboss.org
Fri Dec 7 08:01:19 EST 2012


    [ https://issues.jboss.org/browse/JBLOGGING-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740114#comment-12740114 ] 

Claudio Miranda commented on JBLOGGING-84:
------------------------------------------

I believe this RFE is related to the case I will describe, if not I will open a new RFE.

Having come from a JBoss AS background, so it is more related to it.

The needs come to have a property to set the default locale of jboss logging, and not depend upon default locale (-Duser.country=BR and -Duser.language=pt).


However I see from the current code, it is not possible.

org.jboss.logging.Messages.java

     public static <T> T getBundle(Class<T> type, Locale locale) {
         String language = locale.getLanguage();
         String country = locale.getCountry();
         String variant = locale.getVariant();

The simplest case to solve it to create a property at jvm level and in the describing code above, check for that property and use it, using as fallback the current implementation, what do you think ?

Why I ask that ?


>From a application server point of view.

1. Its kind of weird to deal with some translations for technical terms, they just don't sound right. I am not blaming the translation text, only that it doesn't fit in the technical view to analyze logs and messages.

2. Not all messages are localized, so printing only english messages looks more consistent

[org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Iniciando o Serviço de Nomeação
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Implantação do driver compatível-JDBC class org.h2.Driver (versão 1.3)
[org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Ativação da Extensão WebServices
[org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Sessão de correio limitado [java:jboss/mail/Default]
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.1)
[org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.4.GA-redhat-1
[org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http-localhost/127.0.0.1:8080
[org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Limite da fonte de dados [java:jboss/datasources/ExampleDS]
[org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Limite da fonte de dados [java:jboss/datasources/KitchensinkQuickstartSSO]
[org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Iniciando a implantação do "jboss-as-cdi-injection.war"
[org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Escutando no 127.0.0.1:9999
[org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Escutando no 127.0.0.1:4447

3. If the user wants to search in the internet for help, it is not going to have success with this term "Sessão de correio limitado"

4. The user who uses an application servers is expected to understand many technical terms in english language, so he already understand relevant english terms to read the english log messages.

5. There are accents in many translated words, when they are displayed in terminal consoles (with different charset encoding), it only show a binary character instead of the accented char.


                
> Configurable default Locale for Logger#getMessageLogger()
> ---------------------------------------------------------
>
>                 Key: JBLOGGING-84
>                 URL: https://issues.jboss.org/browse/JBLOGGING-84
>             Project: JBoss Logging
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>            Reporter: Michael Locher
>            Assignee: David Lloyd
>
> Please make the Locale for org.jboss.logging.Logger#getMessageLogger configurable (e.g. via a system property).
> Use Case:
> Having different locales for 'application code' which is deployed in JBAPP (specified as JVM default at startup and available via Locale.getDefault()) and the locale for logging of JBAPP.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list