Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2
Description
The method org.apache.logging.log4j.core.net.Priority#getValue() has the same problem as previously mentioned in issue LOG4J2-102:
Incorrect:
public int getValue() { return facility.getCode() << 3 + severity.getCode(); }
Correct:
public int getValue() { return (facility.getCode() << 3) + severity.getCode(); }
Perhaps also clean up the code so that the logic is only implemented in one place:
public static int getPriority(final Facility facility, final Level level) { return new Priority(facility, Severity.getSeverity(level)).getValue(); }
Attachments
Issue Links
- is related to
-
LOG4J2-102 Bad priority in Syslog messages
- Closed