[logging] Milliseconds not logged on Windows
Hi all, I'm using the latest boost logging library from the sandbox, in conjunction with boost 1.35.0. I'm seeing problems with millisecond strings in the log under Windows VS2005. The following formatter works fine under posix (specifically, Mac OS X): g_log_dbg()->writer().add_formatter( formatter::time("$hh:$mm.$ss. $mili ") ); Here's some sample output: 19:33.54.4196908 hello, world 19:33.54.4197788 this is so cool (but only in the debug build) 1 But the same code running under Windows always outputs a consistent, bogus millisecond value: 18:41.47.-858993460 hello, world 18:41.47.-858993460 this is so cool (but only in the debug build) 1 Looks like a sign extension problem. But I have to admit that I have not invested the time to determine whether this is a bug in the logging library proper, or a problem with the underlying boost 1.35.0 precision time and string utilities used by the logging library. Regardless I can probably live without milliseconds in my Windows logs, so I'll work around it with a platform conditional that specifies an alternate format string under Windows. Best, -- Allen Cronce
participants (1)
-
Allen Cronce