Is there a method for creating a log file using a blackberry api ?
Something like log4j ?
I\'d like to save this log file on pc running the emulator, is this
BlackBerry has its own log facility - EventLogger, but I find it to be ugly. You can write to EventLogger, but you can not view it as easily as you might with other logs or for example you can not extract the content programmatically to send over http/email.
I think it is much more comfortable to use your custom logger class that writes log entries directly to a log file on the SD card. Since the SD card on the emulator is a folder on your PC, you can easily monitor the app with any PC log viewer in real time.
Also as a bonus with such approach you can have some code to send the log over http/email. Such logging on a real device will slow down the app significantly, so it should not be normally used in production, but your app could have such option (to enable the debug mose) so it'll allow to know the reason which otherwise would remain unknown.