You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2005/06/16 00:42:34 UTC

cvs commit: logging-log4cxx/src hierarchy.cpp

carnold     2005/06/15 15:42:34

  Modified:    src      hierarchy.cpp
  Log:
  LOGCXX-77: Have setThreshold() suppress default initialization
  
  Revision  Changes    Path
  1.24      +4 -3      logging-log4cxx/src/hierarchy.cpp
  
  Index: hierarchy.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/hierarchy.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- hierarchy.cpp	13 Jun 2005 22:00:04 -0000	1.23
  +++ hierarchy.cpp	15 Jun 2005 22:42:34 -0000	1.24
  @@ -39,10 +39,8 @@
   
   Hierarchy::Hierarchy(const LoggerPtr& root) : root(root), 
   emittedNoAppenderWarning(false), emittedNoResourceBundleWarning(false),
  -mutex(), configured(false)
  +mutex(), configured(false), thresholdInt(Level::ALL_INT), threshold(Level::getAll())
   {
  -        // Enable all level levels by default.
  -        setThreshold(Level::getAll());
           this->root->setHierarchy(this);
           defaultFactory = new DefaultCategoryFactory();
   }
  @@ -103,6 +101,9 @@
           {
                   thresholdInt = l->toInt();
                   threshold = l;
  +				if (thresholdInt != Level::ALL_INT) {
  +					setConfigured(true);
  +				}
           }
   }