Logging in J2ME

2019-01-17 07:51发布

What logging solutions exist for j2me?

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

8条回答
迷人小祖宗
2楼-- · 2019-01-17 08:25

I wrote a bytecode optimizer, and because of the format of class files you can point to the UTF encoding of classname & function which allows you to output logs with MyClass.someFunc() (you can process the signature if you want to get the types) which allows you to do something like the C style debug using LINE & FILE macros.

查看更多
唯我独甜
3楼-- · 2019-01-17 08:29

LWUIT framework of the J2ME provide the Logging form which can have a log the statement inside it. You can add the log at each and every place you think may generate the exception.

Example : Log.getInstance().showLog(); By adding the above line you can able to track the logging in the J2ME devices.

查看更多
登录 后发表回答