Monday, October 18, 2010

Pantheios 1.0.1 beta 197 released: be.file supports date/time in log file name

The latest release of Pantheios provides an enhancement to the be.file back-end, supporting current-date and/or current-time to form part of the log file-name. For example,

  #include <pantheios/backends/bec.file.h>


The %T specifier is replaced by the current time, in the format HHMMSS. The %D specifier is replaced by the current date, in the format YYYYMMSS. If the function is called at, say, 7:22 am (and 10 seconds) on the 19th October 2010, the process will log to the file test-20101019-072210.log.

(Note, as always, the following caveat: Pantheios' stock back-ends are intended for tutorial or simple program purposes. More sophisticated logging should be provided by having Pantheios delegate its transport to a fully-fledged logging library.)

No comments:

Post a Comment