|
Boost : |
Subject: Re: [boost] boost log to display source code name and lines
From: hh h (jupiter.hce_at_[hidden])
Date: 2018-12-28 10:18:25
That's so helpful, thank you very much Andrey.
On 12/28/18, Andrey Semashev via Boost <boost_at_[hidden]> wrote:
> On 12/28/18 10:42 AM, hh h wrote:
>> I'd like to run a macro which can display file name and code lines by
>> calling LOG(debug) << "debug here"; the following example answered Mar
>> 10 '16 at 8:50 by jma looks good, but I could not compile it, I am
>> running on ubuntu 18 that the boost version is 1.65:
>>
>> https://stackoverflow.com/questions/35895199/boost-log-and-severity-local-attributes/api.stackexchange.com
>>
>> error: no matching function for call to
>> âboost::log::v2_mt_posix::core::add_sink(std::shared_ptr<boost::log::v2_mt_posix::sinks::synchronous_sink<boost::log::v2_mt_posix::sinks::text_file_backend>
>>> &)â
>> logging::core::get()->add_sink(sink);
>
> Boost.Log uses boost::shared_ptr, not std::shared_ptr.
>
>> Another one in following link even got more errors I won't be bothered to
>> post.
>>
>> http://gernotklingler.com/blog/simple-customized-logger-based-boost-log-v2/
>>
>> error: missing template arguments before âloggerâ
>> boost::log::sources::severity_logger_mt logger;
>> ......
>
> The quoted code sample in the linked blog page is indeed missing
> template arguments in a few places. The original code on GitHub
> (https://github.com/gklingler/simpleLogger) seems to be better, although
> I didn't try to compile it. I guess, some parts got lost in the blog due
> to missing HTML escaping.
>
> PS: Don't top-post, please.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk