O'Reilly logo

LWUIT 1.1 for Java ME Developers by Biswajit Sarkar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing Log

The Log class supports customization through the install method, which allows a subclass to be plugged in. This subclass can override some of the methods to modify logging behavior to some extent. However, there are limitations to this approach. For example, a subclass cannot access the private variable fileWriteEnabled , as there are no getter and setter methods for it. In order to adapt logging in a more significant way, we shall subclass Log but refrain from plugging it into a log object. Instead, we shall use the subclass directly to provide the desired functionalities.

There are three main objectives that we would like our custom class to meet. These are:

  • We should be able to log into a file if the device supports the file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required