#include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static bool flushAfterLog = false;

void proxyLogSetFlush(bool enabled)
{
  flushAfterLog = enabled;
}

void proxyLog(const char* format, ...)
{
  va_list args;

  va_start(args, format);

  printTimeString();
  putchar(' ');
  vprintf(format, args);
  putchar('\n');

  if (flushAfterLog)
  {
    fflush(stdout);
  }

  va_end(args);
}

#include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static bool flushAfterLog = false;

void proxyLogSetFlush(bool enabled)
{
  flushAfterLog = enabled;
}

void proxyLog(const char* format, ...)
{
  va_list args;

  va_start(args, format);

  printTimeString();
  printf(" ");
  vprintf(format, args);
  printf("\n");

  if (flushAfterLog)
  {
    fflush(stdout);
  }

  va_end(args);
}

--- 
+++ 
@@ -20,9 +20,9 @@
   va_start(args, format);
 
   printTimeString();
-  printf(" ");
+  putchar(' ');
   vprintf(format, args);
-  printf("\n");
+  putchar('\n');
 
   if (flushAfterLog)
   {
Use putchar instead of printf.
