From da0993edb828d86b7e874e99b9865368b7b789a8 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 27 Feb 2018 13:40:45 +0200 Subject: liblog: Implement functions --- src/liblog.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/liblog.c b/src/liblog.c index 522166e..392e58c 100644 --- a/src/liblog.c +++ b/src/liblog.c @@ -1,19 +1,25 @@ #include +#include int -__android_log_print(int prio, const char *tag, const char *fmt, ...) +__android_log_vprint(int prio, const char *tag, const char *fmt, va_list ap) { - return 0; + printf("(%d) %s :: ", prio, tag); + return vprintf(fmt, ap); } int -__android_log_vprint(int prio, const char *tag, const char *fmt, va_list ap) +__android_log_print(int prio, const char *tag, const char *fmt, ...) { - return 0; + va_list ap; + va_start(ap, fmt); + int ret = __android_log_vprint(prio, tag, fmt, ap); + va_end(ap); + return ret; } int __android_log_write(int prio, const char *tag, const char *text) { - return 0; + return __android_log_print(prio, tag, "%s", text); } -- cgit v1.2.3-70-g09d2