Monday, November 8, 2010

Wide String Shims for std::exception

The new release of STLSoft supports seamless use of exceptions with Pantheios (and FastFormat)  in wide-string builds; described on this post on the STLSoft project blog.

Pantheios 1.0.1 beta 198 released: new i and xi inserters

The latest release of Pantheios includes two new inserters, pantheios::i and pantheios::xi. The former is a typedef for the pantheios::integer inserter class, and may be used interchangeably with it:

  #include <pantheios/inserters/i.hpp>
  #include <pantheios/pan.hpp>
  int n = 10;

  pan::log_DEBUG("i=", pan::i(n));
  pan::log_DEBUG("i=", pan::i(n, -10));
  pan::log_DEBUG("i=", pan::i(n, -10, pan::fmt::hex));

produces the same output (and effectively the same binary) as:

  #include <pantheios/inserters/integer.hpp>
  #include <pantheios/pan.hpp>

  int n = 10;

  pan::log_DEBUG("i=", pan::integer(n));
  pan::log_DEBUG("i=", pan::integer(n, -10));
  pan::log_DEBUG("i=", pan::integer(n, -10, pan::fmt::hex));

The latter is actually a new class, and is used specifically for inserting integers in hexadecimal form, optionally specifying minimum width:

  #include <pantheios/inserters/xi.hpp>
  #include <pantheios/pan.hpp>
  int n = 16;

  pan::log_DEBUG("i=", pan::xi(n));
  pan::log_DEBUG("i=", pan::xi(n, -10));

The (hopefully obvious) advantage to both these new inserter types is that they're more succinct. There are more to come ...

Tuesday, November 2, 2010

User blogs about "Pantheios Basics"

Just to let you know, a user has kindly posted a tutorial Pantheios logging library - basic blog entry, which covers the basics of obtaining, installing, and using the Pantheios library.

I've just scanned it, and it looks like it covers quite a lot of stuff.

I'll read it fully soon, and post any more relevant news.

Thanks, Son DN!