Package org.j4me.logging

Provides application logging suitable for constrained devices.

See:
          Description

Class Summary
Level Defines the logging level constants.
Log Maintains a recording of the application's operation.
LogMessage A message logged by the application.
 

Package org.j4me.logging Description

Provides application logging suitable for constrained devices. The concepts are similar to those in Log4J or the Java Standard Edition's logging package.

J4ME stores log messages in a circular buffer in memory. This is very fast and memory efficient. The alternative is to use RMS to store the logs on the device's persistent memory but this is very slow on a lot of devices and therefore inappropriate. If you require this you should try MicroLog which is more extensible, but much more heavyweight.

When using the emulator for testing logs are output to the console window similar to using System.out.println. To see the logs on devices you need to have screens that display them. You can use the ones from the logging example directly. You may want to "hide" the log from users by making it accessible through a secret key combination such as holding down the "*" key for 3 seconds.

Example

An example is provided in the /examples folder under the org.j4me.examples.log package. It logs the various J2ME optional packages available on the device.