From ce81770156f637740744af009de7273a3ff96b7d Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 17 Jan 2013 12:15:39 +0100 Subject: [PATCH] Increase Haskell log file resolution Currently the Haskell logging goes with the default time formatting, which lacks sub-second resolution. This is not good, as it's too coarse. The patch adds picoseconds to the log; they will contain usually too many zeroes, but the other option is to use a log format that (for precisely zero fractional part) omits the separator, so it's not consistent from line to line, and which also uses a dot as a separator, different from the Python code. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- src/Ganeti/Logging.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ganeti/Logging.hs b/src/Ganeti/Logging.hs index 0cc3dd61e..f1776df32 100644 --- a/src/Ganeti/Logging.hs +++ b/src/Ganeti/Logging.hs @@ -12,7 +12,7 @@ Note that this requires the hslogger library version 1.1 and above. {- -Copyright (C) 2011, 2012 Google Inc. +Copyright (C) 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,7 +77,7 @@ logFormatter prog mt syslog = else "" , " $prio $msg" ] - in simpleLogFormatter $ concat parts + in tfLogFormatter "%F %X,%q %Z" $ concat parts -- | Helper to open and set the formatter on a log if enabled by a -- given condition, otherwise returning an empty list. -- GitLab