
On Thu, Feb 07, 2008 at 11:26:33PM +0200, John Torjo wrote: John, please do not remove "Phil wrote" line.
Hi Phil,
From what I can see so far, using this library is not going to be a compelling alternative to the concise
#include <syslog.h> syslog(LOG_WARN,"Blob %d failed to %s",n,x);
Why not? If you say that writing to syslog is that easy, then adding a formater class for syslog should be as easy as what I've just attached. It should work out of the box, but I haven't tested it. Please let me know if it works.
I've looked here: http://www.opengroup.org/onlinepubs/009695399/functions/syslog.html Does it handle Unicode (it doesn't seem to)?
To be honest I never considered using syslog for application programs. I thought it is only used for system programs, services, ... It is nevertheless very likely that the encoding is just ignored. Write UTF-8 and you will be able to read your stuff in the log. If other programs write KOI8-RU encoded text you will end with a log file with different encoding. That's at least what I guess. Jens