Missed the most important part ...

To get the logs, you would need to issue and adb command ... "adb
logcat"

On Mar 16, 8:37 am, rktb <yend...@pv.com> wrote:
> printing to the console will probably not work unless your code is
> running as root. Android provides an easy way of obtaining logs
> through logcat. The following are the changes that would be required
> to get logs on native code:
> (1) Include the header file <utils/Log.h>
>      #include <utils/Log.h>
> (2) Define the logger tag LOG_TAG
>      #undef LOG_TAG
>      #define LOG_TAG "MyWebKitLog"
> (3) Write the log statement
>      LOGE("This is my log statement on line %d",__LINE__);
> (4) If not already done, add libutils and libcutils to the list of
> LOCAL_SHARED_LIBRARIES in the webkit Android.mk.
>
> Note: Similar to LOGE, there are other logger definitions as well,
> like, LOGV, LOGI, LOGW, LOGF, LOGS, etc. For details about the
> implementation and usage, please refer the logcat module 
> athttp://android.git.kernel.org/?p=platform/system/core.git;a=blob;f=lo...
>
> -Ravi
>
> On Mar 16, 12:35 am, vincent Kor <kor.vinc...@gmail.com> wrote:
>
> > Could you please help to explain in more detail ?  Have you ever tried that?
>
> > Thanks
>
> > Vincent
>
> > On Mon, Mar 16, 2009 at 12:12 PM, rktb <yend...@pv.com> wrote:
>
> > > Hi,
>
> > > Did you try logcat?
>
> > > -Ravi
>
> > > On Mar 15, 10:35 pm, vincent Kor <kor.vinc...@gmail.com> wrote:
> > > > Hi All:
>
> > > >     is there any way to print log in webkit native code??  I used printf
> > > but
> > > > it can't be displayed in the console and there is nothing in DDMS also.
>
> > > > Thanks a lot ....
>
> > > > Vincent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to