|
Boost : |
Subject: Re: [boost] boost log to display source code name and lines
From: hh h (jupiter.hce_at_[hidden])
Date: 2018-12-28 07:42:27
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::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);
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;
......
Thanks Andrey.
On 12/28/18, Andrey Semashev via Boost <boost_at_[hidden]> wrote:
> On 12/28/18 12:36 AM, hh h via Boost wrote:
>> Hi,
>>
>> I am looking for good log library to replace google log, my plan is to
>> use boost log, but I am not sure if it is mature or it has been used
>> seriously.
>
> I don't have any hard numbers, but the library is fairly mature and
> there are real world users.
>
>> It lacks some simple basic features such as display source code name
>> and lines in log file, I've searched on line discussion, there are
>> many suggestion to fix it in piece of code, but I could not get that
>> work, difficult to use it may be overstated. Are there any good
>> examples to display source program name and lines similar to asio
>> socket examples on line?
>
> Given that you've found examples online, could you describe what you've
> tried and what doesn't work? Also, did you try searching on
> StackOverflow? I remember there were examples of what you're asking.
>
> _______________________________________________
> 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