Merge remote-tracking branch 'exim_github/pr/18'
[exim.git] / src / exim_monitor / em_log.c
index 8cad78245a7b4d1ba05554bad759249b92465f1a..6efd9c0c96ee3157bf05a6194575332cdb1793c0 100644 (file)
@@ -1,10 +1,8 @@
-/* $Cambridge: exim/src/exim_monitor/em_log.c,v 1.6 2009/11/16 19:50:36 nm4 Exp $ */
-
 /*************************************************
 *                 Exim Monitor                   *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2009 */
+/* Copyright (c) University of Cambridge 1995 - 2014 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* This module contains code for scanning the main log,
@@ -58,6 +56,8 @@ static int scrolled = FALSE;
 static int size = 0;
 static int top = 0;
 
+static void show_log(char *s, ...) PRINTF_FUNCTION(1,2);
+
 static void show_log(char *s, ...)
 {
 int length, newtop;
@@ -364,6 +364,8 @@ link count of zero on the currently open file. */
 if (log_datestamping)
   {
   uschar log_file_wanted[256];
+  /* Do *not* use "%s" here, we need the %D datestamp in the log_file to
+   *   be expanded! */
   string_format(log_file_wanted, sizeof(log_file_wanted), CS log_file);
   if (Ustrcmp(log_file_wanted, log_file_open) != 0)
     {