Boost logo

Boost :

From: JD (jean.daniel.michaud_at_[hidden])
Date: 2007-05-15 04:05:43


Hi,

        I have uploaded the small logging object I proposed a few weeks ago
with some changes following Andrey remarks.

> And finally some implementation-regarded notes (though I understand
> this was just a draft, I couldn't hold myself, sorry :) ):
> 1. The logger is default-constructible from the user's code, but it
> seems that you intended to make it singleton.

fixed

> 2. logger::get_instance is not thread-safe - function-scope statics
> are used.

I think it's fixed now...

> 3. You should not define namespace bl = boost::logging; in the library
> code.

fixed

> 4. Element global operators should be in boost::logging namespace.
> They will be reachable via ADL.

ADL does not work with old compilers (msvc-6.0)

> 5. Each logging record involves std::stringstream (even not
> ostringstream) construction, formatted output copying, and
> destruction. I'm afraid, that would be a performance impact on the
> application.

fixed

> 6. I believe, some of the "Logging typedefs declarations" might have
> been hidden into the logger class and renamed. Some other names (like
> null_deleter) might have been hidden to an internal namespace.
>

Got to think about that.

It also compiles with bjam v2 now on a 1.34.0.
And it also compiles when added in multiple source files (hum).

Here it is: (http://minilien.com/?2oscdAofQK)
Just download it in boot_1_34_0 and unzip it.

Next steps:
   Allow formatting per sink.
   Allow max level definition per sink.
   Allow severity/level definition.

Regards,

JD


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