11 #ifndef _RDLOG_H_29JUNE2005_ 12 #define _RDLOG_H_29JUNE2005_ 15 #include <boost/iostreams/tee.hpp> 16 #include <boost/iostreams/stream.hpp> 21 typedef boost::iostreams::tee_device<std::ostream, std::ostream>
RDTee;
32 rdLogger(std::ostream *dest,
bool owner =
false)
33 : dp_dest(dest), df_owner(owner), df_enabled(true),
34 tee(0), teestream(0){};
38 tee =
new RDTee(*dp_dest, stream);
60 std::ostream &
toStream(std::ostream &);
62 #define BOOST_LOG(__arg__) \ 63 if ((!__arg__) || (!__arg__->dp_dest) || !(__arg__->df_enabled)) \ 66 RDLog::toStream((__arg__->teestream) ? *(__arg__->teestream) : *(__arg__->dp_dest)) 76 #define BOOST_LOG_NO_LIB 77 #include <boost/log/log.hpp> 78 BOOST_DECLARE_LOG(rdAppLog)
79 BOOST_DECLARE_LOG(rdDebugLog)
80 BOOST_DECLARE_LOG(rdInfoLog)
81 BOOST_DECLARE_LOG(rdErrorLog)
82 BOOST_DECLARE_LOG(rdWarningLog)
83 BOOST_DECLARE_LOG(rdStatusLog)
rdLogger(std::ostream *dest, bool owner=false)
boost::logging::rdLogger * rdWarningLog
boost::logging::rdLogger * rdAppLog
void AddTee(std::ostream &stream)
boost::iostreams::stream< RDTee > RDTeeStream
boost::iostreams::tee_device< std::ostream, std::ostream > RDTee
boost::logging::rdLogger * rdStatusLog
boost::logging::rdLogger * rdDebugLog
std::ostream & toStream(std::ostream &)
boost::logging::rdLogger * rdInfoLog
void enable_logs(const char *arg)
boost::logging::rdLogger * rdErrorLog
void disable_logs(const char *arg)