Blackberry console output

2020-02-01 14:12发布

I am new in black berry development, just like console output in J2me development and log cat in Android to see the event log of the simulator, is there anything for Blackberry so that I can keep a track on application logging on Blackberry.

2条回答
叛逆
2楼-- · 2020-02-01 14:46

We can use System.out.println to print something to console.

Also we can use EventLogger to log events to device system log (to view the current event log for the device, go to home screen hold down the ALT key and type "lglg"). Its more fun since we can filter logging by source and priority. Event log file also may be downloaded from device with command:

javaloader.exe -u eventlog > eventlog.txt

See article about javaloader

Also, consider to use some custom logging with microlog lib.

查看更多
beautiful°
3楼-- · 2020-02-01 14:53

You can use System.out.println() and it will appear in the output window in Eclipse. I would suggest putting some wrapper class around it to emulate some of the features of LogCat, such as making static methods that tag each with [DEBUG], [ERROR], stuff like that. Also, there will be a good bit of other debug output from the simulator/device, so find a way to distinguish your logs (I prepend ========== to each of them so I can see it quickly).

查看更多
登录 后发表回答