Creating Logs on Andorid
Hi, Is there a way to create logs on Android, when I use predictor in WhatsThis applcaition
Do you mean in the cpp part?
In the cpp file you can use this
#include <android/log.h>
...
__android_log_print(ANDROID_LOG_INFO, "TAG_FOR_THE_APP", "LOG_MESSAGE");
When you compile the shared library you have to link android log with
-llog
Hi @SlipknotTN thank your for providing your feedback. But when i use amalgalmation part of mxnet with all stuff you mentioned earlier lead to an issue of below stuff not defined
ANDROID_LOG_INFO
As i am not clear about where to place -llog in amalgalmation folder.
You have to add -llog in the Makefile of the amalgamation.
For example, instead of
CFLAGS=-std=c++11 -Wno-unknown-pragmas -Wall ifneq ($(MIN), 1) CFLAGS += -I${OPENBLAS_ROOT} -I${OPENBLAS_ROOT}/include LDFLAGS+= -L${OPENBLAS_ROOT} -L${OPENBLAS_ROOT}/lib -lopenblas endif
use this
CFLAGS=-std=c++11 -Wno-unknown-pragmas -Wall LDFLAGS = -llog ifneq ($(MIN), 1) CFLAGS += -I${OPENBLAS_ROOT} -I${OPENBLAS_ROOT}/include LDFLAGS+= -L${OPENBLAS_ROOT} -L${OPENBLAS_ROOT}/lib -lopenblas endif
Hi @SlipknotTN thnx for your help. We are now able to have android logging working.