Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2005-04-29 15:59:45


John Torjo wrote:

> Hi all,
>
> I've just updated the Boost Log Library:

Thanks for all your feedback.

I've updated the lib so that it allows enabling/disabling of logs at
compile-time, what Darren Cook asked.

In order to allow enable/disable at compile-time, all you need to do is
declare the log like this:

// instead of BOOST_DECLARE_LOG(some_log_name)
BOOST_DECLARE_LOG_DEBUG(some_log_name)

Or, you can specify your own constant that can be 1 (enable the log) or
0 (disable the log).

#define TESTING 1
// or #define TESTING 0

// if TESTING is 1, the 'test' log is enabled
// if TESTING is 0, the 'test' log is disabled
BOOST_DECLARE_LOG_COMPILE_TIME(test, TESTING)

(note: there's also an example: compile_time_logs)

Download the latest versin:
http://torjo.com/code/logging-v132.zip

I've seen that some of you have requested "levels", and yes, I should
add them. I hope I'll have time to implement them soon (less than a month).

Anyway, I'll request a formal review after implementing levels as well.

Best,
John

-- 
John Torjo,    Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/ -v1.6.3 (Resource Splitter)
-- 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