Boost logo

Boost :

From: John Torjo (john.groups_at_[hidden])
Date: 2008-04-03 08:21:17


Hi Manuel,

Sorry for the late reply. Here it is:

struct string_logger {
    std::vector<std::string> strs;
};

struct to_string :
        boost::logging::destination::class_<to_string,
boost::logging::destination::implement_op_equal::has_context>,
        boost::logging::destination::non_const_context<string_logger> {

    bool operator==(const to_string& other) const { return &context() ==
&other.context(); }
    void operator()(param msg) const {
        context().strs.push_back(msg);
    }
};

Best,
John
> Hi,
> Thanks! Thats great, im looking forward to it :-)
> Greetigns
> Manuel
>
>
>

-- 
http://John.Torjo.com -- C++ expert
http://blog.torjo.com
... call me only if you want things done right

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk