You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Paul D Johe (JIRA)" <ji...@apache.org> on 2015/03/04 19:54:38 UTC

[jira] [Reopened] (LOG4J2-968) SyslogLayout contains extra space

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

Paul D Johe reopened LOG4J2-968:
--------------------------------

Hmmm...

commit 87a07d474686b8d8e97c1898d8a402165e5d25d9 fixed the issue, but then commit 350dad1b3a86507d6d471bb9813be6b8db71aaf0 broke it again. 

Please revert commit 350dad1b3a86507d6d471bb9813be6b8db71aaf0.

> SyslogLayout contains extra space
> ---------------------------------
>
>                 Key: LOG4J2-968
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-968
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.2
>            Reporter: Paul D Johe
>              Labels: syslog, syslogappender
>             Fix For: 2.2.1
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> There is a extra space in the SyslogLayout so that that message is not compliant with the BSD format:
> {code}
>     /**
>      * Date format used if header = true.
>      */
>     private final SimpleDateFormat dateFormat = new SimpleDateFormat("MMM dd HH:mm:ss ", Locale.ENGLISH);
> {code}
> Note the extra space at the end of the date format.
> When this is used, another space is appended afterwards all the same:
> {code}
>         addDate(event.getTimeMillis(), buf);
>         buf.append(' ');
> {code}
> This leads to incorrect data containing two spaces between the date field and the localHostname.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org