Boost logo

Boost :

Subject: Re: [boost] [logging] Interest check on logging library.
From: Gordon Woodhull (gordon_at_[hidden])
Date: 2009-01-01 17:53:04


On Jan 1, 2009, at 5:11 PM, Andrey Semashev wrote:
> That is your choice, indeed. However, in general, this will not
> allow you to immediately see if the record will be processed or not.
> This is because filters are usually set up in some initialization
> code, which is rather remote from places where you actually write
> logs.

I believe what Jason is talking about is compile-time filtering where
the compiler actually does know the answer and is able to eliminate
code. The "trivial 'if'" is gone after optimization. This seems like
a very nice feature to me.

(earlier post:)
> writing the result of a function call, like dump_hex in your
> example. I didn't investigate this, but I suspect the call will
> still be present in the compiled code, which, AFAICT, is not what
> you intended.

These is what the lazy function evaluation is for. It seems to me
that lazy functions are going to be necessary for any non-macro
solution that doesn't require ifs in user code, but they might also be
helpful with the runtime filtering you are talking about?

I really like the syntax and compile-time filtering of this new
proposal - please figure out how to combine these two libraries!

Gordon


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk