mcatan      2004/04/24 14:35:51

  Modified:    examples delayedloop.cpp
               performance main.cpp
  Log:
  log4cxx could not compile when configured without XML
  
  Revision  Changes    Path
  1.4       +3 -2      logging-log4cxx/examples/delayedloop.cpp
  
  Index: delayedloop.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/examples/delayedloop.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- delayedloop.cpp   22 Apr 2004 21:21:29 -0000      1.3
  +++ delayedloop.cpp   24 Apr 2004 21:35:51 -0000      1.4
  @@ -22,7 +22,6 @@
   
   using namespace log4cxx;
   using namespace log4cxx::helpers;
  -using namespace log4cxx::xml;
   
   /**
   This test program sits in a loop and logs things. Its logging is
  @@ -60,11 +59,13 @@
   
        static void init(const String& configFile)
        {
  +#ifdef HAVE_XML
                if(StringHelper::endsWith(configFile, _T("xml")))
                {
  -                     DOMConfigurator::configureAndWatch(configFile, 3000);
  +                     xml::DOMConfigurator::configureAndWatch(configFile, 
3000);
                } 
                else
  +#endif
                {
                        PropertyConfigurator::configureAndWatch(configFile, 
3000);
                }
  
  
  
  1.4       +2 -11     logging-log4cxx/performance/main.cpp
  
  Index: main.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/performance/main.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- main.cpp  22 Apr 2004 21:21:33 -0000      1.3
  +++ main.cpp  24 Apr 2004 21:35:51 -0000      1.4
  @@ -24,13 +24,8 @@
   #include <log4cxx/helpers/system.h>
   #include <log4cxx/helpers/thread.h>
   
  -#ifdef HAVE_MS_XML
  -#include <windows.h>
  -#endif
  -
   using namespace log4cxx;
   using namespace log4cxx::helpers;
  -using namespace log4cxx::xml;
   
   int runLength;
   int delay = -1;
  @@ -72,12 +67,8 @@
                DELAY_MULT = 1000/burstLen;
        }
   
  -#ifdef HAVE_MS_XML
  -             ::CoInitialize(0);
  -#endif
  -     DOMConfigurator::configure(configFile);
  -#ifdef HAVE_MS_XML
  -             ::CoUninitialize();
  +#ifdef HAVE_MS_XML   
  +     xml::DOMConfigurator::configure(configFile);
   #endif
   }
   
  
  
  

Reply via email to