Dec 7, 2008

Useful Microlog Feedback

During this week I received some really useful and tangible feedback for Microlog. First I received feedback regarding file logging, i.e. logging with the FileAppender. Later this week I got feedback regarding the reading of logs from the RecordStore.

The feedback for the FileAppender was from the beginning rather straightforward. The developer had found that the JavaDoc and the code were not in sync. The documentation stated that there should be a setDirectory() method available. As it turned out there was no such method. The setFilename() & getFilename() had the same documentation. In other words a ordinary copy-and-paste mistake. The missing setDirecotory() method was not so serious, but yet annoying. I implemented the setDirectory() method within a couple of minutes. I did not really consider the implications of this solution. What the developer really wanted was a method to set the filename, with or without the full path. He did not want to make a separation between the filename and the directory. The final solution was rather elegant. If the user sets a filename with a full path, this is used. Otherwise the user defined filename is used, but the first root directory is used. A feature request for some kind of rotating file logging was also included. The feature request for a rotating log created two featuture requests at the end, a RollingFileAppender and a RotatingFileAppender.

What started out as a discussion about an HTTPAppender in Microlog, lead to a discussion about how to load a log from the RecordStore. One developer wanted som examples on how to read the log content. The code was really spread out in the RecordStoreLogViewer class. This is a MIDlet that is used for reading the log content. The idea is that you switch to this MIDlet when you want to read the log from another MIDlet. What I did was simple. I extracted the load logging parts from the RecordStoreLogViewer into a new class called RecordStoreLogLoader. This was a good thing. The log reading functionality has no right to exists within the RecordStoreLogViewer MIDlet. The is a matter of separation of concerns, as some object orientation guru might have put it.

I try to handle the requests with the same tactics I use for my wife; I try to be as responsive as possible. The initial code changes are in place, as well as a snapshot release. These changes will probably lead to a continued discussion. This shows the real power of open source development. With about 3-4 iterations I had a solution that satisfied the developers need, and it took 3-4 days to solve. What a joy it is to be part of an Open Source project (like Microlog)!


web said...

Your website is fine for all its distinctive features. However, I have found to be another content enriched website containing details on Outsourcing software development,ecommerce solutions and software development.

My Open Source Software Development Blog said...

I cannot see the relevance of this comment in this context.

Shopping Cart said...

Thanks for the sharing useful ideas.
I tink it is such a good feed back.
Now i down load the snapshot.