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

Java Development

Reply
Developer
Kallin
Posts: 151
Registered: ‎03-27-2009
My Device: Not Specified
Accepted Solution

Unable to log anything to event log.

I'm trying to get debug text from my program to show up in my simulator's event log (or anywhere for that matter), but haven't had any luck. I'm talking about the log you get to by going tools/Event Log .

 

I first tried printing to System.out, System.err, and nothing showed up in the log.

 

I then tried using the EventLogger, but still nothing. I did something really simple:

 

 

long GUID = 0xaffff32c2ffffcffL; EventLogger.register(GUID, "test", EventLogger.VIEWER_STRING); EventLogger.logEvent(GUID, "testing!".getBytes());

 

I can't think of what else to try! How else can I try to get debug printouts from my app?

 

 

 

 

Please use plain text.
Retired
ttahir
Posts: 36
Registered: ‎07-14-2008
My Device: Not Specified

Re: Unable to log anything to event log.

Try holding down the ALT key and pressing "lglg" while on the BlackBerry home screen.
Please use plain text.
Developer
Kallin
Posts: 151
Registered: ‎03-27-2009
My Device: Not Specified

Re: Unable to log anything to event log.

OK I can pull up the in device event log now, and it shows my app being added, but my 'testing!' message doesn't show up. I tried switching the level to 'warning' as well with no luck.
Please use plain text.
Developer
Kallin
Posts: 151
Registered: ‎03-27-2009
My Device: Not Specified

Re: Unable to log anything to event log.

I'm using the 4.6.0.190_9000 simulator. Should I be using another?
Please use plain text.
Developer
Kallin
Posts: 151
Registered: ‎03-27-2009
My Device: Not Specified

Re: Unable to log anything to event log.

Lol, my bad. I was starting the eventlogger after entering the eventdispatcher.

 

 I still wonder how to see the logs in the simulator's event log.. It says 'event log', so I'm assuming it should be the same thing as the 'event log' pulled up on the simulator by 'alt lglg'. 

 

Leaving my app to view the logs is less than ideal..

Please use plain text.
Developer
peter_strange
Posts: 19,607
Registered: ‎07-14-2008
My Device: Not Specified

Re: Unable to log anything to event log.

"Leaving my app to view the logs is less than ideal.."

 

But putting them in the Even log is very useful, especially for timing related issues with other BB activity.

 

I retain a copy of the last nnn messages in a temporary array, so that these could be displayed while in the application.  However I would never ask an end user to do this.  So instead, they have a way of emailing these messages to a support email address. 

Please use plain text.
Developer
Kallin
Posts: 151
Registered: ‎03-27-2009
My Device: Not Specified

Re: Unable to log anything to event log.

I agree the event log is useful, I was just curious if it is possible to have things logged to the separate eventlog window that comes with the simulators. That way I could view the logs in realtime while the app runs, and in a much more reasonable font.
Please use plain text.
Developer
peter_strange
Posts: 19,607
Registered: ‎07-14-2008
My Device: Not Specified

Re: Unable to log anything to event log.

In our apps, the processing that adds the events to the stored array also does a System.out.println(...) and so the output goes to the ourput window in the JDE. 

 

The Eventlog window for the Simulator has a different purpose - this is from the HELP on the 4.6 Bold Simulator:

 

"The event log window displays information about events that occur between a simulated BlackBerry® device and its environment. The BlackBerry device simulator logs event messages for events including when you simulate playing audio files, placing a phone call, and blinking the LED screen."

Please use plain text.
Developer
Kallin
Posts: 151
Registered: ‎03-27-2009
My Device: Not Specified

Re: Unable to log anything to event log.

Cool thx. Guess I didn't rtfm to full effect :smileytongue:

 

I've been coding in intellij, building with ant, and just loading the COD files. I'm going to setup eclipse so I can run/debug through there. Hopefully there's an intellij plugin eventually, it rocks eclipse :smileywink:

Please use plain text.