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 "Gary Gregory (JIRA)" <ji...@apache.org> on 2015/03/04 20:22:38 UTC

[jira] [Resolved] (LOG4J2-971) Another bad priority in Syslog messages

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

Gary Gregory resolved LOG4J2-971.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.1

Fix pushed to git master and https://repository.apache.org/content/repositories/snapshots/

Please verify and close.

> Another bad priority in Syslog messages
> ---------------------------------------
>
>                 Key: LOG4J2-971
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-971
>             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
>
> The method org.apache.logging.log4j.core.net.Priority#getValue() has the same problem as previously mentioned in issue LOG4J2-102:
> Incorrect:
> {code}
> public int getValue() {
>         return facility.getCode() << 3 + severity.getCode();
>     }
> {code}
> Correct:
> {code}
> public int getValue() {
>         return (facility.getCode() << 3) + severity.getCode();
>     }
> {code}
> Perhaps also clean up the code so that the logic is only implemented in one place:
> {code}
>     public static int getPriority(final Facility facility, final Level level) {
>         return new Priority(facility, Severity.getSeverity(level)).getValue();
>     }
> {code}



--
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