Logging in J2ME

后端 未结 8 2226
不知归路
不知归路 2020-12-08 16:25

What logging solutions exist for j2me?

I\'m specifically interested in easily excluding logging for \"release\" version, to have a smaller package & memory foot

8条回答
  •  情书的邮戳
    2020-12-08 16:59

    The Series60 and UIQ phone that have a Sun virtual machine modified by Symbian itself have Standard Output redirection.

    Not only can you capture System.out but Throwable.printStackTrace() also works.

    On early handsets, You would need to write a C++ application that hooks into the standard library server process. Symbian produced the Redirector application that could capture the VM standard output to a console or a file.

    On newer handsets, a "redirect://" GCF protocol was introduced that could read the VM standard output into a Java byte[] or String object (you would want to do that in a separate MIDlet) and the Redirector application was rewritten in Java.

    On the newest J9 VM used in Series60 3rd Edition Feature Pack 2 handsets (and later), you may need to try "redirect://test" instead.

提交回复
热议问题