"What is So Special About Microlog?", this was the first question I got this morning when arriving to work. This was asked by one of the Java Enterprise specialists at my work. Hmmm... let me think. I was a bit paralyzed by the question, although I should not be. This is not the first time I get this question, I get this question a lot (from people not working with Java ME).
My first answer was "size!". The Log4j jar is 389kB, but Microlog is about 110 kB. But the actual jar size is not what is interesting, but the overhead that Microlog add to the jar. In normal cases it is somewhere between 30-40 kB, depending on what you decide to use. I consider this to be little overhead considering that you get two appenders with two formatters and the configuration framework with the ability to configure via properties files and/or JAD settings files. Plus you get the ability to setup your loggers in a logging hierarchy. All in all, the small size of Microlog is one of its benefits.
My second answer was "remote logging". Log4j contains some remote logging destinations, like syslog daemons and JDBC. Microlog has also support for logging to syslog daemons. This is one of my personal favorites. It is easy to setup a syslog daemon and you get the logs on the server directly. I choose not to implement JDBC support in Microlog. First of all, it makes me sick to think about setting up a JDBC server. Secondly there is not many JDBC drivers available for Java ME with CLDC. Instead I implemented support for logging to Amazon S3. It is easy to setup and you have access to very much storage for a cheap price. Right now you can upload 1 GB for $0.03. Compare this to the price of setting up a JDBC server. You cannot work for many seconds before you have used up your $0.03! It is also very pratical to log to Amazon S3. For example you log to a file, when the file gets to big or when you log above a certain level, the file is copied to the server. As far as I know this is a unique feature, this is not implemented in Log4j and I do no know any other logging library which has suport for Amazon S3. And that is not all; Microlog has support for sending an SMS/MMS or e-mail as well. Log4j has support for e-mail which is based on a simple SMTP client. Micrologs implementation is a little bit smaller and smarter. It uses the Wireless Messaging API (JSR-205) to send an e-mail. The actual assembling of the e-mail and the sending code is less than 30 lines of code. Quite impressive if you ask me, but I am a little bit biased. What do you think? These are the most important remote loggers, but there are more. Please take a look at the Microlog documentation to find out more.
The second question was "how do people do logging if they do not have Microlog?". My answer was "I am not sure, but I guess that they log to the record store or to a file". But if you choose to log to the record store, they also need to implement some kind of log viewer. The data is stored as a byte[] in the record store, which is hard to read right away.
After some further discussion with my collegue, he ask me "...then people must be very happy when the find out about Microlog?". Yes in fact they they are. At least the people that I have spooken to. Of course, sometimes people have some issues with Microlog that they do not like or like to improve. But I always try to listen to the feedback I get and improve Microlog accordingly. In fact most of the important changes are based on feedback. So please continue giving me more feedback about Microlog.
My first answer was "size!". The Log4j jar is 389kB, but Microlog is about 110 kB. But the actual jar size is not what is interesting, but the overhead that Microlog add to the jar. In normal cases it is somewhere between 30-40 kB, depending on what you decide to use. I consider this to be little overhead considering that you get two appenders with two formatters and the configuration framework with the ability to configure via properties files and/or JAD settings files. Plus you get the ability to setup your loggers in a logging hierarchy. All in all, the small size of Microlog is one of its benefits.
My second answer was "remote logging". Log4j contains some remote logging destinations, like syslog daemons and JDBC. Microlog has also support for logging to syslog daemons. This is one of my personal favorites. It is easy to setup a syslog daemon and you get the logs on the server directly. I choose not to implement JDBC support in Microlog. First of all, it makes me sick to think about setting up a JDBC server. Secondly there is not many JDBC drivers available for Java ME with CLDC. Instead I implemented support for logging to Amazon S3. It is easy to setup and you have access to very much storage for a cheap price. Right now you can upload 1 GB for $0.03. Compare this to the price of setting up a JDBC server. You cannot work for many seconds before you have used up your $0.03! It is also very pratical to log to Amazon S3. For example you log to a file, when the file gets to big or when you log above a certain level, the file is copied to the server. As far as I know this is a unique feature, this is not implemented in Log4j and I do no know any other logging library which has suport for Amazon S3. And that is not all; Microlog has support for sending an SMS/MMS or e-mail as well. Log4j has support for e-mail which is based on a simple SMTP client. Micrologs implementation is a little bit smaller and smarter. It uses the Wireless Messaging API (JSR-205) to send an e-mail. The actual assembling of the e-mail and the sending code is less than 30 lines of code. Quite impressive if you ask me, but I am a little bit biased. What do you think? These are the most important remote loggers, but there are more. Please take a look at the Microlog documentation to find out more.
The second question was "how do people do logging if they do not have Microlog?". My answer was "I am not sure, but I guess that they log to the record store or to a file". But if you choose to log to the record store, they also need to implement some kind of log viewer. The data is stored as a byte[] in the record store, which is hard to read right away.
After some further discussion with my collegue, he ask me "...then people must be very happy when the find out about Microlog?". Yes in fact they they are. At least the people that I have spooken to. Of course, sometimes people have some issues with Microlog that they do not like or like to improve. But I always try to listen to the feedback I get and improve Microlog accordingly. In fact most of the important changes are based on feedback. So please continue giving me more feedback about Microlog.