[ 
https://issues.apache.org/jira/browse/LOG4J2-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14569905#comment-14569905
 ] 

Gary Gregory commented on LOG4J2-1038:
--------------------------------------

{quote}
Why is the default not UTF-8 across all layouts? This seems like a saner 
default.
{quote}

It is for String layouts (the kind of layout that carries a Charset), see my 
comments and hopefully improved docs 
https://issues.apache.org/jira/browse/LOG4J2-1038?focusedCommentId=14569765&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14569765

Not ALL layouts have a configurable charset. For some the charset is hard coded 
(to UTF-8) for the GELF layout for example.

{quote}
Why doesn't log4j2 encourage users to specify an explicit charset by warning 
that the configured charset is unportable?
{quote}

Define not portable...

If you mean a charset not on the handful of required JRE charsets, that's 
pretty narrow!

Feel free to create a JIRA with a specific feature request.

Any help we can get to improve the software and the documentation is welcome! 
Patches welcome!

> Incorrect documentation for layout default charset
> --------------------------------------------------
>
>                 Key: LOG4J2-1038
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1038
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Documentation, Layouts
>    Affects Versions: 2.1
>            Reporter: Gili
>
> https://issues.apache.org/jira/browse/LOG4J2-255 states that the default 
> charset is the system default (a fact I confirmed by running local tests). 
> http://logging.apache.org/log4j/2.x/manual/layouts.html incorrectly states 
> that the default charset is UTF-8.
> Please update the documentation to state that the default is the system 
> default and strongly recommend (in bold) that the user sets an explicit 
> charset.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to