11 #ifndef _RDLOG_H_29JUNE2005_ 12 #define _RDLOG_H_29JUNE2005_ 16 #include <boost/iostreams/tee.hpp> 17 #include <boost/iostreams/stream.hpp> 23 typedef boost::iostreams::tee_device<std::ostream, std::ostream>
RDTee;
34 rdLogger(std::ostream *dest,
bool owner =
false)
46 tee =
new RDTee(*dp_dest, stream);
85 std::ostream &
toStream(std::ostream &);
87 #define BOOST_LOG(__arg__) \ 88 if ((!__arg__) || (!__arg__->dp_dest) || !(__arg__->df_enabled)) \ 91 RDLog::toStream((__arg__->teestream) ? *(__arg__->teestream) \ 92 : *(__arg__->dp_dest)) 102 #define BOOST_LOG_NO_LIB 103 #include <boost/log/log.hpp> 104 BOOST_DECLARE_LOG(rdAppLog)
105 BOOST_DECLARE_LOG(rdDebugLog)
106 BOOST_DECLARE_LOG(rdInfoLog)
107 BOOST_DECLARE_LOG(rdErrorLog)
108 BOOST_DECLARE_LOG(rdWarningLog)
109 BOOST_DECLARE_LOG(rdStatusLog)
void SetTee(std::ostream &stream)
Sets a stream to tee the output to.
rdLogger(std::ostream *dest, bool owner=false)
boost::logging::rdLogger * rdWarningLog
boost::logging::rdLogger * rdAppLog
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 ClearTee()
Remove our tee if it's set.
void enable_logs(const char *arg)
boost::logging::rdLogger * rdErrorLog
void disable_logs(const char *arg)