www.digitalmars.com         C & C++   DMDScript  

c++.announce - [STLSoft] 1.9.1 beta 13 released

reply "Matthew" <matthew hat.stlsoft.dot.org> writes:
More of the same: lots of directory refactoring, and a few enhancements. I
hope you can feel the momentum building ... ;-)

Support for the very-soon-to-be-released Pantheios (http://pantheios.org/)

Download from http://stlsoft.org/downloads.html#stlsoft_1_9_1b13
Jul 11 2006
parent reply "Pavel Vozenilek" <pavel_vozenilek yahoo.co.uk> writes:
"Matthew" wrote:

 Support for the very-soon-to-be-released Pantheios (http://pantheios.org/)

What is Pantheios, if it is not secret? /Pavel
Jul 12 2006
parent reply Pablo Aguilar <pablo.aguilar gmail.com> writes:
Pavel Vozenilek wrote:
 "Matthew" wrote:
 
 Support for the very-soon-to-be-released Pantheios (http://pantheios.org/)

What is Pantheios, if it is not secret? /Pavel

A logging library. Pablo
Jul 12 2006
parent reply "Matthew" <nowhere noaddress.co.us> writes:
It is the *ultimate* logging library API: it gives 100% type-safety,
extensibility, genericity, extremely high efficiency, atomicity,
thread-safety, platform-independence, and, most importantly, is effectively
zero-cost when a given logging severity level is not currently enabled. I've
included two graphs (in subsequent posts) that illustrate the last
characteristics better than words can. This test is included in the distro
(and will be expounded upon in the next few days to include comparison with
log4cxx as well as the others), along with a detailed explanation of what's
going on. Basically the three scenarios are (i) string objects (std::string,
char[], char const*, stlsoft::simple_string), (ii) pointers and numeric
types, (iii) heterogeneous types (struct tm, HWND, GUID, and a few others).
(It also incurs *no* memory allocation whatsoever when logging a statement
with less than 2048 characters, by using stlsoft::auto_buffer <g>)

Effectively, it means you don't ever have to have write things like the
following in high performance contexts:

void func(std::string const &s1, struct tm const &t, int i);
{
#if defined(DEBUG) || defined(LOGGING_ON)
    char sz[101];
    strftime(sz, 101, the time format string, t);
    Acme::Log::Info("func(%s, %s, i)", s1.c_str(), sz, i);
#endif

    . . .  // rest of function
}

You just write

void func(std::string const &s1, struct tm const &t, int i);
{
    pantheios::log_INFORMATIONAL("func(", s1, ", ", t, ", ", i, ")");

    . . .  // rest of function
}

and the statement has effectively zero-cost when the INFORMATIONAL severity
level is not enabled. Mixed with a bit of shared memory (as I've done on a
couple of projects), this allows you to switch logging on/off in an
application at runtime and have it not impact on application performance
when off. The implications for production and testability are self-evident.


It is important to note that Pantheios it is a logging _API_ library, not a
logging library. Although it comes with many stock logging back-ends -
console (fprintf), syslog (for UNIX and Win32), Win32 debugger, Win32 Event
Log, COM Error Object, and so on - it does not have all the rich
filtering/appending of something like log4cxx. *However*, there is no reason
why a custom back-end/front-end combination cannot integrate with the
transport and filtering/appending provided by log4cxx or any other logging
library. That's something I've been trying to find time to work out, and am
confident it'll be a snap, but it's likely to be a 1.1 thing.

I've had it in production in many of my systems, and in several client
solutions for a couple of years; I use it for nearly everything now. It's
just I've been trying to find time to launch it replete with a decent
website and documentation. (Ah, documentation, don't you love it!)

So it's not a secret. You can be sure there'll be plenty of fanfare when
it's released. ;-)

Once it's launched (on SF), I'm very keen to have people join the project
and contribute, as I don't think I've come anywhere near to exhausting its
potential.

Cheers

Matthew

"Pablo Aguilar" <pablo.aguilar gmail.com> wrote in message
news:e939hs$1gja$1 digitaldaemon.com...
 Pavel Vozenilek wrote:
 "Matthew" wrote:

 Support for the very-soon-to-be-released Pantheios
 (http://pantheios.org/)

What is Pantheios, if it is not secret? /Pavel

A logging library. Pablo

Jul 12 2006
next sibling parent "Matthew" <nowhere noaddress.co.us> writes:

Jul 12 2006
prev sibling parent "Matthew" <nowhere noaddress.co.us> writes:

Jul 12 2006