Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

Reply
Contributor
Posts: 13
Registered: ‎10-06-2011
My Device: Torch 9780
My Carrier: TMobile

Unable to write to event log

I try writing debug statement to event log. Here are the steps I did

1)  Create UID 2) register with event log EventLogger.register(LOGUID, "My Event Log", EventLogger.ALWAYS_LOG).

3) EventLogger.logEvent(LOGUID,msg.getBytes(), EventLogger.ALWAYS_LOG).

On the Blackberry phone, I set eventlog option set to Min log level to Debug Info and Filter Setting to check My Event Log.

I do not see any log output to eventLog. Do I miss anything here?

 

Thank you in advance.

 

BlackBerry Development Advisor
Posts: 15,813
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Unable to write to event log

Try extracting the whole log using this command:

 

javaloader -u eventlog > mylog.txt

 

javaloader.exe is a command line tool included with the BlackBerry Java SDK and BlackBerry JDE.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Contributor
Posts: 13
Registered: ‎10-06-2011
My Device: Torch 9780
My Carrier: TMobile

Re: Unable to write to event log

Thank you Mark. I extracted eventlog. But I do not see the debug log.

BlackBerry Development Advisor
Posts: 15,813
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Unable to write to event log

Are you sure that the event logging code ran?  Try stepping through with the debugger attached.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Contributor
Posts: 13
Registered: ‎10-06-2011
My Device: Torch 9780
My Carrier: TMobile

Re: Unable to write to event log

Thanks. I am able to write the debug log to the event log.