04-25-2009 11:53 AM
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?
Solved! Go to Solution.
04-25-2009 12:08 PM
04-25-2009 02:48 PM
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..
04-26-2009 08:37 AM
"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.
04-26-2009 10:45 AM
04-26-2009 02:13 PM
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."
04-26-2009 02:16 PM
Cool thx. Guess I didn't rtfm to full effect
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