
On Mon, 25 Apr 2005 14:43:57 +0200 John Torjo <john.lists@torjo.com> wrote:
Using the library in code is easy and straightforward:
int i = 1, j = 2, k = 3; BOOST_LOG(app) << "testing " << i << '-' << j << '-' << k << std::endl; BOOST_LOG(dbg) << "this is a debug message, i=" << i << std::endl; BOOST_LOG(info) << "I just wanted to tell you something....";
Along the same lines as other comments, but a little different... There should be more than one logging variable. You said the above roughly translates to: if ( is_log_enabled(app) ) app_log() << "testing" << i ...; However, this restricts the application to one single logging status. I want something like: if ( is_log_enabled(logvar_foo, app) app_log(logvar_foo) << "testing" << i ...; which allows the application to have many different logging state objects. In addition, I think any logging statement should be able to be conditionally compiled away. This should also be based on a value. For example, I should be able to specify on the command line something like: compile away all logging statements below level-x, or compile away all logging statements for domain foo, below level-x. I guess I am looking for more flexibility. Any logging statement should be able to be compiled away. Any logging statement should be able to check multiple levels against one of many different logging state objects.