30 #include <boost/shared_ptr.hpp>
31 #include <boost/any.hpp>
40 using boost::shared_ptr;
52 LogDestination::LogDestination(ostream *strm,
53 const shared_ptr<LogFormatter>& formatter,
55 : _threshold(threshold), _strm(strm), _frmtr(formatter)
61 LogDestination::LogDestination(
const LogDestination& that)
62 : _threshold(that._threshold), _strm(that._strm), _frmtr(that._frmtr)
68 LogDestination::~LogDestination() { }
73 LogDestination& LogDestination::operator=(
const LogDestination& that) {
74 _threshold = that._threshold;
90 bool LogDestination::write(
const LogRecord& rec) {
91 if (_strm != 0 && _frmtr.get() != 0 &&
92 rec.getImportance() >= _threshold)
94 _frmtr->write(_strm, rec);
definition of the LogRecord, RecordProperty and Prop classes
definition of the LogDestination class