diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-27 13:40:45 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-27 13:43:09 +0200 |
commit | da0993edb828d86b7e874e99b9865368b7b789a8 (patch) | |
tree | 3ff12c0437be7e032b9c93bb583c839abac0ead8 | |
parent | 2be4fd887755106443669b1dd3760fc81ccab856 (diff) |
liblog: Implement functions
-rw-r--r-- | src/liblog.c | 16 |
1 files 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 <stdarg.h> +#include <stdio.h> 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); } |