[
https://issues.apache.org/jira/browse/LOG4J2-1636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563412#comment-15563412
]
Gary Gregory commented on LOG4J2-1636:
--------------------------------------
This is pretty bad WRT performance and our GC-free epic. I'm not sure I would
support such a change. If anything I could see re-coding the
{{ConsoleAppender}} such that is would ask the layout to encode to a {{String}}
instead of to a {{byte[]}} and then print that on the print stream. A big
change though. I'm not sure what kind of traction this would get here. The
change Ralph mentions about a component knowing its parent at build time is
something more generally useful and fitting within the current architecture.
The changes to the {{ConsoleAppender}} would be minimal. To be sure, this
change requires knowledge of Log4j internals.
> Console Appender does not pick up Oracle Java 8's sun.stdout.encoding and
> sun.stderr.encoding
> ----------------------------------------------------------------------------------------------
>
> Key: LOG4J2-1636
> URL: https://issues.apache.org/jira/browse/LOG4J2-1636
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders, Layouts
> Environment: Windows
> Reporter: Eldar Gabdullin
> Assignee: Gary Gregory
>
> The Oracle Java 8 platform supports two system properties to configure the
> System console: sun.stdout.encoding and sun.stderr.encoding.
> ----
> Default log4j configuration prints to console using platform's default
> encoding, however that's not what standard windows console expects.
> I.e.
> {code}
> System.out.println("Поехали"); // works just fine
> System.out.write("Поехали!\n".getBytes(Charset.defaultCharset())); //
> characters are messed up
> log.info("Поехали"); // messed up in the same way
> {code}
> This happens not just on one machine, but on all Windows desktops and servers
> in our organization.
> Can we have out of the box Layout/Appender which prints directly to
> System.out/err?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]