The easiest way of logging is to add
System.out.println() lines to your code. This can be useful in emulator environment, but in real devices something else is needed. One efficient way is to use Microlog logging library. It supports Java ME and Android and makes it possible to log to file, to PC via Bluetooth and also to servers online. Only couple of lines of code need to be added to the MIDlet source code.
Read more about logging with Microlog from Developer Nokia Wiki.