aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/log_android.c
diff options
context:
space:
mode:
authorGravatar Todd Poynor <toddpoynor@google.com>2015-01-23 18:31:03 -0800
committerGravatar Todd Poynor <toddpoynor@google.com>2015-01-27 15:49:33 -0800
commitcb7abfd6628e77481d06d449a691133df2e894bb (patch)
tree0f2b94ac7503103b75267913f7ff4b05c34beced /src/core/support/log_android.c
parent768fd511a4a7ae4c981984fe221aea836be962ed (diff)
fixup compile error in log_android.c
compilation errors introduced in the following commit. commit 0cd69562fd8c005361e3f32ac0d3f9d43b713827 Author: ctiller <ctiller@google.com> Date: Fri Jan 9 14:22:10 2015 -0800 Allow logging mechanism to be overridden by applications. This necessitated the removal of gpr_vlog to keep a clean interface. Change on 2015/01/09 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83634996 Errors are: grpc/src/core/support/log_android.c:75:20: error: 'file' undeclared (first use in this function) display_file = file; ^ grpc/src/core/support/log_android.c:75:20: note: each undeclared identifier is reported only once for each function it appears in grpc/src/core/support/log_android.c:79:13: error: 'prefix' undeclared (first use in this function) asprintf(&prefix, "%s:%d] %s", display_file, args->line, args->message); ^ grpc/src/core/support/log_android.c:85:8: error: 'suffix' undeclared (first use in this function) free(suffix); ^
Diffstat (limited to 'src/core/support/log_android.c')
-rw-r--r--src/core/support/log_android.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/support/log_android.c b/src/core/support/log_android.c
index 11129e3e06..53c8153593 100644
--- a/src/core/support/log_android.c
+++ b/src/core/support/log_android.c
@@ -72,17 +72,15 @@ void gpr_default_log(gpr_log_func_args *args) {
final_slash = strrchr(args->file, '/');
if (final_slash == NULL)
- display_file = file;
+ display_file = args->file;
else
display_file = final_slash + 1;
- asprintf(&prefix, "%s:%d] %s", display_file, args->line, args->message);
+ asprintf(&output, "%s:%d] %s", display_file, args->line, args->message);
__android_log_write(severity_to_log_priority(args->severity), "GRPC", output);
/* allocated by asprintf => use free, not gpr_free */
- free(prefix);
- free(suffix);
free(output);
}