RDLog.h

Go to the documentation of this file.
00001 //
00002 // Copyright (C)  2005-2008 Greg Landrum and Rational Discovery LLC
00003 //
00004 //  @@ All Rights Reserved @@
00005 //
00006 
00007 #ifndef _RDLOG_H_29JUNE2005_
00008 #define _RDLOG_H_29JUNE2005_
00009 
00010 #if 1
00011 #include <iostream>
00012 extern std::ostream *rdAppLog;
00013 extern std::ostream *rdDebugLog;
00014 extern std::ostream *rdInfoLog;
00015 extern std::ostream *rdErrorLog;
00016 extern std::ostream *rdWarningLog;
00017 extern std::ostream *rdStatusLog;
00018 namespace boost {
00019   namespace logging {
00020     void enable_logs(const char *arg);
00021     void enable_logs(const std::string &arg);
00022     void disable_logs(const char *arg);
00023     void disable_logs(const std::string &arg);
00024   }
00025 }
00026 namespace RDLog {
00027   std::ostream &toStream(std::ostream &);
00028 }
00029 #define BOOST_LOG(__arg__) if(!__arg__) ; else RDLog::toStream(*__arg__)
00030 
00031 #else
00032 #define BOOST_LOG_NO_LIB
00033 #include <boost/log/log.hpp>
00034 BOOST_DECLARE_LOG(rdAppLog)
00035 BOOST_DECLARE_LOG(rdDebugLog)
00036 BOOST_DECLARE_LOG(rdInfoLog)
00037 BOOST_DECLARE_LOG(rdErrorLog)
00038 BOOST_DECLARE_LOG(rdWarningLog)
00039 BOOST_DECLARE_LOG(rdStatusLog)
00040 #endif
00041 namespace RDLog {
00042   void InitLogs();
00043 }
00044 #endif
00045 

Generated on Tue Oct 7 06:10:11 2008 for RDCode by  doxygen 1.5.5