Public Release: azlw Enhanced Log Version 2.01 Now available
Category News and Events Technical LotusAfter completing a significant revamp of my Enhanced Log Class; I have decided to release it to the public under the University of Illinois/NCSA Open Source License. This essentially means you can use it in whatever form you choose (you can even resell it or include it in your code that you resell), as long as you include the appropriate credit. It's pretty simple: just don't be a jerk and claim you wrote the code.
For those of you who are using version 1 (v1.0, v1.01, or v1.0.2), please be aware that METHOD SIGNATURES HAVE CHANGED. This means you can't simply drop this in as an upgrade and expect it to work. I'm sorry for the hassle, but the EnhancedLog object now FULLY extends the NotesLog object; the signature changes were necessary to maintain proper compatibility with the NotesLog object.
At this point, only the LotusScript code is included. Due to the significant method signature changes, the Java code is not yet ready, and is not included in this release. I expect to have it (version 2.0.2) ready soon (before Lotusphere).
As always, it is available in the downloads area.
Log Entries are created by programs and stored in documents using the Log Entry form.
The Log Entry form is based on the Lotus-provided Log Entry form; it uses the same primary field names to maintain compatibility with the Lotus-provided template (alog4.ntf).
This enhanced version incorporates a much richer set of logging capabilities than the Lotus-provided template.
When an Event (Action, Extended Content, or Exception) is logged the information about the event is written to a Log Entry document. One document is created per Programmatic Session. Multiple events are logged (along with a timestamp) to the this single document.
Minimum ACL settings for target log databases (those within which log documents will be created) is AUTHOR, with the ability to Create New documents.
The following design elements should be copied under the noted conditions:
- enhLogClass Script Library: This is the core code for the EnhancedLog. Copy this library to all databases which will perform logging.
- lkp-LogsByLogTime View: Copy this view to all databases where Log documents will be created.
- Log Entry Form: Copy this form to all databases where Log documents will be created and viewed.
- Export Log Entries Agent: Copy this agent (modify as necessary) to all databases where Log documents will be created, and from which you wish to export to another repository.
IMPORTANT: In order for the EnhancedLog Class to work properly, all databases within which Log documents will be created must have a default database view. It does not matter which view you set as default.
For this release, only the LotusScript language is supported; program code will make use of the EnhancedLog class to handle all necessary logging tasks. NOTE: If you are using the EnhancedLog Java class in your environment (from release 1.02) you may continue to do so. The Java version 2 code contains significant signature changes, and will be included in release 2.02.
Log Entry documents are created by default in the Notes Database within which the given agent code is running. This behavior can be overridden by calling the OpenLog() method. From a performance standpoint this is not recommended; it is more efficient to use the "current" database than to open a central database every time an agent runs. This template includes an agent (sched-ExportLogEntries) and view (lkp-LogsByLogTime) that can be added to any database (with necessary modifications) which will export the Log Entry documents to a specified central Enhanced Agent Log repository.
Developers can make use of the EnhancedLog class by including the appropriate libraries within their code.
Enjoy, and please let me know how you like it.
-Devin
The Pridelands
Chris Byrne
Show n' Tell Thursdays



Comments
Posted by Bruce Elgort At 10:21:48 AM On 12/05/2008 | - Website - |
It uses a single document per logged session methodology, in the same manner as the standard NotesLog object. However, it greatly extends and enhances the NotesLog (hence the name).
HTH,
-Devin.
Posted by Devin Olson At 10:36:58 AM On 12/05/2008 | - Website - |
Posted by Bruce Elgort At 10:47:41 AM On 12/05/2008 | - Website - |