X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=errlog.c;h=416b87d4f6014551faf3a87d9d342a9fa8b2ef4e;hp=f352f9f03096ad5c52c107687f774cc7b73169b2;hb=ae931e26de71fe1d1bd124ed66e98dbd3f11deaf;hpb=94fd77e2b3c8d1d9b77544e6fd2c0c1cc290d67d diff --git a/errlog.c b/errlog.c index f352f9f0..416b87d4 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.106 2010/07/26 11:21:47 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.110 2010/07/26 12:11:51 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -450,7 +450,7 @@ static inline size_t get_log_timestamp(char *buffer, size_t buffer_size) tm_now = *localtime(&now); #endif - length = strftime(buffer, buffer_size, "%b %d %H:%M:%S", &tm_now); + length = strftime(buffer, buffer_size, "%Y-%m-%d %H:%M:%S", &tm_now); if (length > (size_t)0) { msecs_length = snprintf(buffer+length, buffer_size - length, ".%.3ld", msecs); @@ -572,9 +572,12 @@ static inline const char *get_log_level_string(int loglevel) case LOG_LEVEL_CONNECT: log_level_string = "Connect"; break; - case LOG_LEVEL_LOG: + case LOG_LEVEL_WRITING: log_level_string = "Writing"; break; + case LOG_LEVEL_RECEIVED: + log_level_string = "Received"; + break; case LOG_LEVEL_HEADER: log_level_string = "Header"; break; @@ -808,7 +811,7 @@ void log_error(int loglevel, const char *fmt, ...) else { int ret = snprintf(outbuf + length, - log_buffer_size - length - 2, "\\x%.2x", (int)*sval); + log_buffer_size - length - 2, "\\x%.2x", (unsigned char)*sval); assert(ret == 4); length += 4; }