Subject: Re: [boost] Logging library
From: Ivan Le Lann (ivan.lelann_at_[hidden])
Date: 2011-06-28 05:59:07
----- "Tigran Hayrapetyan" <tigran.human_at_[hidden]> a Ã©crit :
> Hello dear Boost community
> Existing logging libraries which I used, are writing log messages
> just one after another.
> In contrast, as we know, almost any application's working structure is
> linear, but hierarchical instead, i.e. functions which call other
> and so on.
> So I decided to implement such logging library. I put it in namespace
> by now, for "Tree Logging". In my implementation hierarchical messages
> presented in XML format, as it is some standard for tree-like data.
> There are two attached files. The library itself is in "tlog.hpp"
> file, and
> "main.cpp" contains a sample application which is using the library
> writes log to "tlog.xml" file. They are written in MS Visual Studio
> Log messages are written with help of 4 macros:
> TLOG_INFO( Logger, Text ) : logs
> with specified text to specified logger with priority "information"
> TLOG_WARNING( Logger, Text ) : logs
> message with
> specified text to specified logger with priority "warning"
> TLOG_ERROR( Logger, Text ) : logs
> with specified text to specified logger with priority "error"
> TLOG_SCOPED_NODE( Logger, NodeName ) : opens xml element in
> the log
> file. The element will be closed at the end of scope, so there is no
> need to
> close it manually.
> I think that the best way to implement entering/leaving subnodes of
> the log
> file, is to use scopes of the code.
> Please review run result and the code, and see if it can be useful
> for boost.
Have you tried Boost.Log and its attributes ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk