You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/02/09 04:10:00 UTC

[jira] [Closed] (LOG4J2-2243) Cannot see or copy all of certain JAnsi exception messages on Windows due to NUL characters

     [ https://issues.apache.org/jira/browse/LOG4J2-2243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory closed LOG4J2-2243.
--------------------------------
    Resolution: Fixed

Fixed in the {{release-2.x}} and {{master}} branches.

> Cannot see or copy all of certain JAnsi exception messages on Windows due to NUL characters
> -------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2243
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2243
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>            Priority: Major
>             Fix For: 2.11.0, 3.0.0
>
>
> Using JAnsi in some cases (like in Eclipse) can cause Log4j's status logger to log the following:
> {noformat}
> 2018-02-08 20:57:05,256 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream due to java.io.IOException: Could not get the screen info: T h e   h a n d l e   i s   i n v a l i d .
> {noformat}
> The problem is that the spaces in the string {{"T h e h a n d l e i s i n v a l i d ."}} are NUL (0) characters. If you copy a whole console, then when you paste, the text you get will stop at the first NUL (0).
> This fix simply replaces NUL characters with SPACEs in the one place where we try to initialize JAnsi.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)