|
Boost : |
From: Richard Day (richardvday_at_[hidden])
Date: 2007-03-31 18:00:21
I havent had a chance to look at your code or pantheios yet but I am
interested in your library.
A boost library would be something to standardize on for larger projects.
One facility I like to have however is the ability to output to the
debugger. Does yours do this or do you intend to add it ?
Its not always feasible to do this for performance reasons though so you
need to be able to toggle it off and on of course(Full screen games are
my biggest culprit there).
I have a very simple library I wrote myself to allow this but it is
lacking some features as well.
It seems everyone has their own homegrown solution to this.
TIA
JD wrote:
> Hello,
>
> So here is the question:
> "Is there any interest in a logging library for boost?"
>
> John Torjo did not answer my mail, beside I looked at pantheios. it
> seems a little bit complex... My idea is that a logging library should
> be _simple_ to use.
>
> Here is a small example:
>
> // snippet on
> #include <fstream>
> #include <boost/logging.hpp>
>
> int main(int argc, char **argv)
> {
> BOOST_LOG_INIT(("[" >> boost::logging::level >> "],"
> >> boost::logging::filename >> "("
> >> boost::logging::line >> "),"
> >> boost::logging::time >> ","
> >> boost::logging::trace
> >> boost::logging::eol), // log format
> 2); // log level
>
>
> BOOST_LOG_ADD_OUTPUT_STREAM(new std::ofstream("./output.log"));
> BOOST_LOG_ADD_OUTPUT_STREAM(&std::cout);
>
> BOOST_LOG(1, "something");
> BOOST_LOG(2, "something else");
> BOOST_LOG(3, "doesn't matter");
> char you_want[256] = "you want";
> BOOST_LOG(1, "Let's say " << you_want << " to display " << 2);
>
> return 0;
> }
> // snippet off
>
> You can find the first draft of a logging library in the boost
> Sandbox vault. It consists of a header files, some examples and
> documentation. Put the file at your boost root folder and unzip it.
>
> It compiles with msvc and vc-8_0. I'll try with gcc asap.
>
> So let me know if you think it worth something or not.
>
> JD
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk