title: log4cplus - how to configure logger child level to depend on its parent
body: <p>Hey I'm trying the log4cplus (which is similar to log4j and therefore my tags) library.</p>
  
  <p>From the property file, is it possible to make a loggers level depend on its parents like this:</p>
  
  <ul>
  <li>If parent=INFO &amp; child=WARN , child should log messages >= "WARN"</li>
  <li>If parent=OFF &amp; child=WARN , child shouldn't log any messages.</li>
  <li>If parent.parent=ALL &amp; parent=WARN &amp; child=INFO, child should log messages >=WARN</li>
  <li>If parent.parent=OFF &amp; parent=ALL &amp; child=WARN , no one should log
  messages cause parent.parent.</li>
  </ul>
  
  <p>With my code below the result is following (and wrong!)</p>
  
  <ul>
  <li>parent=WARN &amp; child=FATAL , child is logging WARN messages</li>
  <li>parent=OFF &amp; child=WARN , child is logging messages.</li>
  </ul>
  
  <p>my property file - log.properties:</p>
  
  <pre><code>    log4cplus.logger.cpuLoad=WARN, FILEAPPENDER
      log4cplus.logger.cpuLoad.child=FATAL, FILEAPPENDER
      log4cplus.additivity.cpuLoad.child=false
  
      log4cplus.appender.FILEAPPENDER=log4cplus::RollingFileAppender
      log4cplus.appender.FILEAPPENDER.File=./cpuLoad.log
      log4cplus.appender.FILEAPPENDER.MaxFileSize=1MB
      log4cplus.appender.FILEAPPENDER.layout=log4cplus::PatternLayout
      log4cplus.appender.FILEAPPENDER.layout.ConversionPattern=%d{%m/%d/%y %H:%M:%S} %-5p %c{2} – %m%n
  </code></pre>
  
  <p>My c++ code - main.cpp:</p>
  
  <pre><code>    Logger loggerCpu = Logger::getInstance("cpuLoad");
      Logger loggerCpuChild = Logger::getInstance("cpuLoad.child");
  
      LOG4CPLUS_WARN(loggerCpu, "hello from loggerCpu");
      LOG4CPLUS_WARN(loggerCpuChild, "hello from loggerCpuChild" );
  </code></pre>
  
  <p>I want this to work from the log4cplus library itself, and mostly from the property file. I also need this parent/child relation so I can use getParent(). Thanks in advance!</p>