Today I am happy to introduce Flow, a full-featured logging engine for LotusScript. Originally named Extended Logging and used in our Logistic and VantagePoint applications, I have decided to release it as a free open-source project on OpenNTF.org.
Now renamed to Flow, this LotusScript class-family allows for rich-text logging to documents and e-mail messages, plain-text files, the Domino console and Notes status bar, as well as to message dialog boxes. Easy to setup and configure — you can be logging in less than four lines of code! — Flow will help you standardize your Lotus Notes application logging needs.
Flow logs events and errors in a streaming style similar to the Domino console or log.nsf database allowing you to follow the step-by-step process that your applications take as they perform their processing. The amount of detail logged is fully configurable and easily modifiable.
Over the past couple months as I have been putting in the finishing touches and getting this ready for public consumption, I have discussed this project with some in the Lotus community and two questions keep coming up. I will answer them here.
How is this different from OpenLog?
Julian’s OpenLog project is undoubtedly fantastic. The original Extended Logging code was created before I had ever heard of OpenLog. When I did hear of it and subsequently tried it out, I found that it did not meet my logging needs. No disrespect meant to Julian — dude, I love your work! — but I really needed to log multiple events and errors in one document as opposed to each event and error having it’s own document. For a product like Logistic, OpenLog simply was not viable. It comes down to a difference in methodology. If OpenLog works for you then I would say stick with it because Flow is not meant as a replacement to OpenLog.
Okay, then how is it different from the NotesLog class?
The NotesLog class provided the type of “streaming” logging that I needed, and I did use it in the pre-Alpha development versions of Logistic. For the final product, however, I really wanted to provide a more readable, user-friendly logging experience. Given that a product like Logistic was going to touch and interact with user’s mail databases and, ultimately, delete documents, it seemed obvious to me that logging was a crucial design point. My customers would require detailed knowledge of what Logistic was doing and why certain documents were targeted for deletion. Therefore, I needed things like rich-text logging so that I could assign different colors for readability, and logging levels so that my customers could chose to have Minimal logging enabled when everything worked well but could turn up the detail level to Normal, Verbose, or Debug in order to get a more detailed, step-by-step flow if events if things went wrong or there were questions about why it processed the way it did. The NotesLog could not give me what I needed.
I assume others must be in a similar predicament as I, therefore I have decided that it is high time for me to give back to the Lotus community by sharing some of my code with all of you. I hope that some of you find Flow useful and will contribute back your modifications in order to make it better. I also hope to share more “glue code” that is used in Conxsys applications in the months and years to come.
You can find the Flow project on the OpenNTF.org site. If you have any questions feel free to contact me or leave a response here.