Welcome to

The Conxsys Blog

Thoughts on Conxsys, Notes/Domino, LotusScript, & Technology

Subscribe to the feed Follow Conxsys on Twitter Follow Corey Davis on Twitter

Conxsys on Facebook

Our Products





Popular Posts


Recent Posts


Categories

Archives

Blogroll

Flow: Advanced LotusScript Logging

April 8th, 2008 by Corey Davis

Notes 8 LogoToday 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.

No TweetBacks yet. (Be the first to Tweet this post)

Tags: , , , ,
Posted in Conxsys, 2,300 views, 4 Comments
Digg This Submit to del.icio.us Submit to Technorati  

4 Responses

  1. Julian Robichaux Says:

    Sounds great Corey! Can’t wait to take a look.

    - Julian

  2. Corey Says:

    Thanks, Julian! Can’t wait to hear what you think.

  3. Mark Barton Says:

    Corey,

    In the advance agent example if I rem out or set the value to false – logger.LogEventsToMail = False I still get the log file emailed to me even if there is no error.

    The only way I can get the email to stop is to also set the logger.LogErrorsToMail = False

    Any ideas?

    Mark

  4. Corey Says:

    Mark,

    That was actually intentional. I always put some starting and ending text in my agents (e.g. “Starting Job” and “Ending Job”) set to Minimal so that there is always something logged even if it is just that starting and ending text. That is useful to me so that I know the agent started and completed. I also tend to fall into the trap of making assumptions that other people do what I do.

    Flow’s current behavior is probably not how most people would assume it would work. I will modify it so that it will not save any documents or send e-mail if an event or error was not logged. I will post a comment here when the fix is available.

    And, by the way, thank you for bringing this to my attention!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Copyright © 2006-2009 by Conxsys | Login | Powered by Wordpress

Template based on a design by Design4