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

[jira] [Created] (LOG4J2-2379) Is the LoggerConfig name and parent blank for a new logger?

Ranjit Dsouza created LOG4J2-2379:
-------------------------------------

             Summary: Is the LoggerConfig name and parent blank for a new logger?
                 Key: LOG4J2-2379
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2379
             Project: Log4j 2
          Issue Type: Question
          Components: Core
    Affects Versions: 2.11.0
            Reporter: Ranjit Dsouza


This is the code snippet, From the output, notice that loggerConfig name is blank and its parent is null

String loggerName = "com.myCompany.myClass";
static Logger logger = LogManager.getLogger(loggerName);
LoggerConfig loggerConfig = LoggerContext.getContext(false).getConfiguration().getLoggerConfig(loggerName);
System.out.println("new loggerConfig name: " + loggerConfig.getName());
System.out.println("new loggerConfig parent : " + loggerConfig.getParent());

Output:
new loggerConfig name: 
new loggerConfig parent : null



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)