Ticket #5069: 0001-Add-a-timestamp-to-the-first-log-message.patch

File 0001-Add-a-timestamp-to-the-first-log-message.patch, 865 bytes (added by karsten, 8 years ago)

Patch to add a timestamp to the first log message

  • src/util.c

    From 03652897fa6df3e3dab1464f570beefa8eea4331 Mon Sep 17 00:00:00 2001
    From: Karsten Loesing <karsten.loesing@gmx.net>
    Date: Fri, 10 Feb 2012 12:25:04 +0100
    Subject: [PATCH] Add a timestamp to the first log message.
    
    ---
     src/util.c |    3 ++-
     1 files changed, 2 insertions(+), 1 deletions(-)
    
    diff --git a/src/util.c b/src/util.c
    index 315c4a3..9517017 100644
    a b close_obfsproxy_logfile(void) 
    445445static int
    446446write_logfile_prologue(int logfile)
    447447{
    448   static const char prologue[] = "\nBrand new obfsproxy log:\n";
     448  static const char prologue[] = "\n";
    449449  if (write(logfile, prologue, strlen(prologue)) != strlen(prologue))
    450450    return -1;
    451451  return 0;
    log_set_method(int method, const char *filename) 
    467467  }
    468468
    469469  logging_method = method;
     470  log_info("Starting.");
    470471
    471472  return 0;
    472473}