diff options
author | Nicolas "Pixel" Noble <nicolas@nobis-crew.org> | 2015-01-13 19:27:02 -0800 |
---|---|---|
committer | Nicolas "Pixel" Noble <nicolas@nobis-crew.org> | 2015-01-13 19:27:02 -0800 |
commit | 848e74441e1cdfe027290e1daf286e243f4b22c1 (patch) | |
tree | e545046267868bf86c98d7e1650ee2c6dcdddd61 /src/core/support | |
parent | 6ba50fde9cafa22640ecac28c91d241a55c6dce9 (diff) |
Fixing log_win32.c
Diffstat (limited to 'src/core/support')
-rw-r--r-- | src/core/support/log_win32.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/support/log_win32.c b/src/core/support/log_win32.c index ae5f23a90d..dc8c1d0785 100644 --- a/src/core/support/log_win32.c +++ b/src/core/support/log_win32.c @@ -36,12 +36,13 @@ #ifdef GPR_WIN32 #include <grpc/support/log.h> +#include <grpc/support/alloc.h> #include <stdio.h> #include <stdarg.h> void gpr_log(const char *file, int line, gpr_log_severity severity, - const char *message) { - const char *message = NULL; + const char *format, ...) { + char *message = NULL; va_list args; int ret; @@ -53,7 +54,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, message = NULL; } else { /* Allocate a new buffer, with space for the NUL terminator. */ - strp_buflen = (size_t)ret + 1; + size_t strp_buflen = (size_t)ret + 1; message = gpr_malloc(strp_buflen); /* Print to the buffer. */ @@ -73,7 +74,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, /* Simple starter implementation */ void gpr_default_log(gpr_log_func_args *args) { - fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(severity), + fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(args->severity), args->file, args->line, args->message); } |