import android.util.Log
Log.w("myApp", "My Message");
From the NDK/Native side ( still logs to logcat)
#include
#define APPNAME "MyApp"
__android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "MyMessage\n");
also remember to add the following to Android.mk
LD_LDFLAGS := -llog