The Microlog project consists of these modules:
- Microlog Java ME library
- Microlog Instrument
- Microlog Instrumentor Example
- Microlog Java ME library Examples
- Microlog Servers
Some users complained about the inability to log the name of the method and the line number where the actual logging took place. The reason for this is that Java ME with the CLDC configuration does not support reflection. Our workaround is to instrument the bytecode before you create your JAR file. The Microlog Instrument module contains a tool for inserting the relevant information. If you wonder how to use it, you could download the Microlog Instrumentor Example module. If you are content with only logging the name of the class, you could use the Logger.getLogger(Class clazz) method to create your Logger instance. This way you get a named logger that has the same name as your class, that is the fully qualified classname. This could be used in conjunction with the Microlog instrumentor, since they are not mutually exclusive. It should be noted that the size of the classes grows when instrumenting them. It is a matter of taste and need that decides when to instrument your classes. One solution could be that you instrument your classes during development, but skip the instrumentation when creating the final jar. This adheres to the Microlog philosophy, we bring you the tools and you select the parts you like.
Last but not least, there is the Microlog Servers module. This contains example code of several servers. I prefer to write examples since the servers are rather simple, although I believe that they are just enough for most people. The output is printed to the standard output. If you start the server from the command line, the output is shown in the command shell. Today there are two servers available; the Bluetooth server and the socket server. The socket server could be used for normal sockets, as well as SSL sockets. Both are intended to be executed on a PC. If you need to execute a Bluetooth server on a phone, there is also a MIDlet version available in the Microlog Java ME library module.
I hope that this guide gave you a good insight into Microlog. Feedback is very welcome.
1 comment:
Puss
Post a Comment