Boost logo

Boost :

From: JD (jean.daniel.michaud_at_[hidden])
Date: 2008-01-10 13:16:05


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.cpp
and
http://loglite.googlecode.com/svn/0.4.0/test/logging_test_iostream_server.cpp

   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


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