Microlog is a small, yet powerful logging library for mobile devices based on the Log4j API. Supports Java ME (J2ME) and Android. Logs to device, to PC or to servers online. Used in all phases from development on emulator/device to outdoor field-testing.

Microlog is licensed under The Apache Software License, Version 2.0 so it is possible to link and distribute commercial software with this library.


  • 31th October 2009: Released V2.1.0 of Microlog
  • 30th October 2009: The article "Powerful Logging in Java ME" was published.

What Developers say about Microlog

  • "Nice little package you did. Very good and useful!" - B Hamanov
  • "Thanks for a great framework!" - M de Beer
  • "...don't stop working on Microlog - there is definitely a need for it within the J2ME community." - J Laursen


  • Easy to setup. Configuration via the application descriptor, dependency injection or a property file.
  • Similar to Log4j, but built from scratch.
  • Small
  • Fast
  • Mature; it has been around since 2005.
  • Many different logging destinations
    • Console - Log to the console, e.g. System.out.
    • RecordStore (RMS) - Log to the record store that is available in all MIDP environments.
    • File - Log to a local file on the devices file system.
    • Canvas - Log to a MIDP canvas.
    • Form - Log to a MIDP Form.
    • Bluetooth - Log via a Bluetooth serial connection to a server on your PC with a GUI.
    • Serial - Log via a serial connection, that could be a USB cable or a Bluetooth connection.
    • Sms - Log to a cyclic buffer and send the buffer as an SMS.
    • Mms - Log to a cyclic buffer and send the buffer as an MMS.
    • Memory - Log to a cyclic or a fixed buffer.
    • Datagram - Log to a datagram and send it using UDP.
    • Syslog - Log to a standard syslog server (daemon).
    • Socket - Log using to a socket connection (also SSL).
    • S3FileAppender - Appends to a file, as in the FileAppender, and stores the file on Amazon S3.
    • S3BufferAppender - Appends to a cyclic buffer and stores it as a file on Amazon S3.
  • Different Formatters for different needs
    • SimpleFormatter - Simple, fast and very small.
    • PatternFormatter - Decide exactly how you want to format your log messages. Inspired by the PatternLayout found in Log4j.

Key usage examples

There are many scenarios when Microlog is usable. Thanks to the different Appenders & Formatters you could adopt to different situations. Here follows a list of scenarios and what to use in the different scenarios.

  1. Early development stage Use the ConsoleAppender and/or the RecordStoreAppender. Use the SimpleFormatter to start with. This makes it possible to run in the emulator and on the target device without any problems.
  2. Main development stage Use the BluetoothSerialAppender to easily transfer the log directly to your PC. The PatternFormatter should be used to create better logging output, e.g. the thread name.
  3. Field test by the developers Use the SyslogAppender class to log directly to a syslog server maintained by your team. The syslog daemon could be used to forward the logging messages, for example by sending e-mail.
  4. Beta/Early access tests Use the MMSAppender to send logs when something critical has happened, e.g. when a FATAL or ERROR message has been logged. This could be sent directly to your bug reporting system and/or some mailing list for your development team. Or you could use the S3FileAppender to log directly into your Amazon S3 account.

Projects that are using Microlog

Please contact us if you want to be listed as project that are using Microlog.


Microlog is designed for running in a Java ME environment and the Android platform.

  • Java ME CLDC 1.1 - Please note that some logging destinations requires support for MIDP and extension to it.


  • Android V1.1 or better


Please use the official forums for bug reports, feature requests or questions about Microlog.