X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=errlog.c;h=416b87d4f6014551faf3a87d9d342a9fa8b2ef4e;hp=3416709928431ad3248c39268eef65e96d831846;hb=34a82d2925cc2d2f34e8275b7259d0530d79abe0;hpb=bea433683776a0f2896172527f8fcb28965a6a28 diff --git a/errlog.c b/errlog.c index 34167099..416b87d4 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.107 2010/07/26 11:24:34 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,7 +572,7 @@ 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: @@ -811,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; }