#include <pantheios/backends/bec.file.h>
pantheios_be_file_setFilePath("test-%T-%D.log");
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