Boost logo

Boost :

Subject: Re: [boost] Review - boost::log
From: Tom Brinkman (reportbase2007_at_[hidden])
Date: 2010-03-14 14:50:17


You coud probably fix all my concerns by adding something like the
following.

Notice that there are no macros, no templates, its header file only and it
does not require any other boost libraries.

Usage: boost::error("An Error has occured: %s\n", "Put message here");

namespace boost::log
{

static void error (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  boost::log (LOG_DOMAIN, LOG_LEVEL_ERROR, format, args);
  va_end (args);
  for(;;) ;
}

static void message (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  boost::log (LOG_DOMAIN, LOG_LEVEL_MESSAGE, format, args);
  va_end (args);
}

static void critical (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  boost::log (LOG_DOMAIN, LOG_LEVEL_CRITICAL, format, args);
  va_end (args);
}

static void warning (const char *format,
           ...)
{
  va_list args;
  va_start (args, format);
  boost::log (LOG_DOMAIN, LOG_LEVEL_WARNING, format, args);
  va_end (args);
}

static void debug (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  boost::log (LOG_DOMAIN, LOG_LEVEL_DEBUG, format, args);
  va_end (args);
}

}


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