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 16:14:04 UTC
[jira] [Created] (LOG4J2-971) Another bad priority in Syslog
messages
Paul D Johe created LOG4J2-971:
----------------------------------
Summary: 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
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