if I understand your question correctly, you need to log information about your object using << operator. Boost Log uses ostream-compatible operators, so all you need is to define << operator for your class:
class your_class_t{
public:
std::string m_data;
int m_value;
friend std::ostream& operator<< (std::ostream& oss, your_class_t const & val) {
oss<<val.m_data << ": " << val.m_value;
return oss;
}
}
Then you can push your class in ostream:
your_class_t mytest;
mytest.m_data = "hi";
mytest.m_value = 123;
BOOST_LOG_TRIVIAL(debug) << mytest;
You'll get hi: 123