Subject: Re: [boost] boost log to display source code name and lines
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-12-28 08:24:58
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:
> error: no matching function for call to
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.
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk