|
Boost : |
From: John Torjo (john.lists_at_[hidden])
Date: 2005-11-09 16:03:41
>>>This might be an argument of making the BOOST_LOG* macros work like this
>>>then:
>>>
>>>BOOST_LOG(logger, msg << to << stream)
>>>
>>>so that the implementation could hold a shared pointer to the logger for
>>
>>the
>>
>>>lifetime of the call. Just a thought.
>>
>>I'm not sure how that would help. Could you give an example? Thanks.
>
>
>
> Actually I'm not sure that changing the syntax of BOOST_LOG/LOGL would even
> be required, based on the way enabled_logger works. It would just involve
> enabled_logger holding a boost::shared_ptr<logger> and the log_name()
> function that is created by BOOST_DEFINE_LOG returning a shared_ptr and not
> a reference.
>
I do have to give it some thought.
Best,
John
-- John Torjo, Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/surfaces.html - Sky's the limit! -- http://www.torjo.com/cb/ - Click, Build, Run!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk