You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Christian Vent (JIRA)" <ji...@apache.org> on 2017/12/21 09:22:00 UTC

[jira] [Created] (LOG4J2-2156) AbstractLogEvent should not implement getLevel()

Christian Vent created LOG4J2-2156:
--------------------------------------

             Summary: AbstractLogEvent should not implement getLevel()
                 Key: LOG4J2-2156
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2156
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
            Reporter: Christian Vent
            Priority: Minor


According to [LOG4J2-462] a LogEvent should never return null for getLevel(). But_org.apache.logging.log4j.core.AbstractLogEvent_ is currently returning null as level, which will lead to an NPE, if one extends this class to create an own LogEvent, without overriding the getLevel() method.

Suggestion is to remove getLevel() from the abstract class, to force developers to decide which level should be returned.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)