xzel23 opened a new issue, #4129:
URL: https://github.com/apache/logging-log4j2/issues/4129

   ## Description
   
   Log4J pattern layout supports a timezone argument and an (undicumented?) 
locale argument.
   
   These patterns both work as expected, i.e., in the second example the german 
month names are used even when the system uses an english locale:
   
   -            "%d{dd-MMMM-yyyy}{GMT} %p %m%n",
   -            "%d{dd-MMMM-yyyy}{GMT}{de-DE} %p %m%n"
   
   That looks like the timezone argument were optional, but then this should 
also work, but does not:
   
   -             "%d{dd-MMMM-yyyy}{de-DE} %p %m%n",
   -             "%d{EEEE, dd. MMMM yyyy}{de-DE} %p %m%n",
   
   In these two latter cases, the locale argument is silently ignored, i.e., 
when run on a system with an English locale, english month names are used.
   
   I think it should either work (use the month names according to the locale 
specified) or be documented.
   
   ## Configuration
   
   **Version:** 2.26.0
   
   **Operating system:** MacOS 26.5
   
   **JDK:** 17
   
   ## Reproduction
   
   The original test is part of a rather large test suite for my Log4J 
compatible pattern parser. I can put some time into creating a JUnit test, but 
I'd like to know what you guys think of it as it's not clear if this is 
intended the way it works now (then documentation should be updated) or not 
(then I'd make it a real JUnit test). I had Codex create a minimal example just 
to give you an idea.
   
   
[Log4jLocaleTest.java](https://github.com/user-attachments/files/28203965/Log4jLocaleTest.java)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to