[Logging] Loglite v 0.4.0 - Getting to something

Hello, Loglite, the small logging library is back with new features. Issues fixed (http://code.google.com/p/loglite/issues/list): 2 - Manage channel 3 - mask instead of level 4 - boost::call_once in logger::get_instance 5 - crashes in multi-threaded 6 - Call stack pb in multithreaded environment 7 - Memory leak and unflushed files on unix systems 8 - Eclipse project files 9 - client/server example crashes 10 - Scope logging 11 - Add function and pretty function name as log element *Scope Logging*: ex:http://loglite.googlecode.com/svn/0.4.0/test/logging_test_scope.cpp You can use a special scope object which log at creation and desctruction. Now the logger maintains a stack of scope and a scope_element has been added to display the stack status in the trace itself. int macro_bar() { BOOST_LOG_SCOPE(BOOST_LOG_LEVEL_1, bar_scope); BOOST_LOG_L1("Doing some processing in macro_bar"); } *Element Formatting*: ex:http://loglite.googlecode.com/svn/0.4.0/test/logging_test_format.cpp Now the date, time and filename element can be formatted. Date and Time can be formatted thanks to the Boost.DateTime format. The filename element can be configured to print it's path or only the filename. boost::logging::format file_format(" L" >> bl::mask >> "," >> (*new bl::filename_element(bl::filename_element::filename_only)) >> "(" >> bl::line >> ")," >> (*new bl::date_element("%d/%m/%Y")) >> " " >> (*new bl::time_element("%H:%M:%S%F")) >> "," >> bl::trace >> bl::eol); *New elements*: to print function name, function signature, qualifier, scope, etc. *CMake makefile*: Compile using CMake. And still... *Log over the network*: ex:http://loglite.googlecode.com/svn/0.4.0/test/logging_test_iostream_client.cp... and http://loglite.googlecode.com/svn/0.4.0/test/logging_test_iostream_server.cp... To centralized the logging of several executables, running on different machines, thanks to Boost.Asio. *Log with shared memory*: ex.:http://loglite.googlecode.com/svn/0.4.0/test/logging_test_iostream_shmem.cpp Avoid slowing down your process. With the shared memory, a independent thread is actually writing the trace to the output stream. *Log directly in zip and/or encrypted format*: ex:http://loglite.googlecode.com/svn/0.4.0/test/logging_test_iostream.cpp Thanks to Boost.Iostreams you can log to a encrypted and/or compressed file very easily. Many thanks to Ilya Pokolev and others for their help. The homepage is here: http://code.google.com/p/loglite/ The SVN repository is here: http://loglite.googlecode.com/svn/trunk/ A tarball is available here: http://loglite.googlecode.com/files/loglite-0.4.0.zip Feel free to ask questions, give comments and remarks, and better, participate to the development. Jean-Daniel

JD <jean.daniel.michaud <at> gmail.com> writes:
Hello,
Loglite, the small logging library is back with new features.
Boost.Logging library is about to be reviewed. How do you place your submission: as an alternative, as an addition. In former case can you compare your approaches, designes etc. Gennadiy

Gennadiy Rozental wrote:
JD <jean.daniel.michaud <at> gmail.com> writes:
Hello,
Loglite, the small logging library is back with new features.
Boost.Logging library is about to be reviewed. How do you place your submission: as an alternative, as an addition. In former case can you compare your approaches, designes etc.
Gennadiy
Loglite is composed of a logger object, aggregating sinks. Each sink corresponds to an output stream, and each sink is associated to a format. A format is a list of "log elements". Those "log elements" corresponds to pieces of information that can be printed with the trace (date, time, filename, function signature, literal, etc). Moreover, each sink is flagged with qualifier (channel) and filters on those and also on mask. All this is contain in one header file and is manipulated with few macros. Basically, I have followed the discussion we had with Andrey Shemashev (who works on its own implementation btw), Caleb Epstein, Austin Bingham and others a year ago, and wrote down a library that reflects my point of view of the question. The requirements we defined then, are still on the wiki. I would appreciate if you could have a look at the library, or at least the example and give me your impression. JD

JD <jean.daniel.michaud <at> gmail.com> writes:
Gennadiy Rozental wrote:
JD <jean.daniel.michaud <at> gmail.com> writes:
Hello,
Loglite, the small logging library is back with new features.
Boost.Logging library is about to be reviewed. How do you place your submission: as an alternative, as an addition. In former case can you
compare
your approaches, designes etc.
Gennadiy
Loglite is composed of a logger object, aggregating sinks. Each sink ....
I would appreciate if you could have a look at the library, or at least the example and give me your impression.
No. I doubt I'll have time soon. But in a light of an upcoming review I would be interrested to hear your opinion on Boost.Logging library as you are obviosly currently are invested into the subject. Specifically from the prospective: why can't you use it?
participants (2)
-
Gennadiy Rozental
-
JD