This project provides code to generate OpenLog errors and events from SSJS or Java. **NOTE**: you will still need a copy of the OpenLog database to log to, from [Open Log Project](https://openntf.org/main.nsf/project.xsp?r=project/OpenLog) Significant benefits of the project are:
The code can reside in an NSF itself or can be deployed to the server as an extension library (OSGi plugin). If you use OpenNTF Domino API, you do not need this project. The code is available to XPages under XspOpenLogUtil class. There is a GitHub project https://github.com/paulswithers/openlogjava as well as a copy of OpenNTF's Stash https://stash.openntf.org/projects/OPENLOG/repos/xpages-openlog-logger/browse
Since M2 there is also a version of the NSF that does not require the Extension Library. The assumption is that if you're using OSGi plugins, you're already using the Extension Library. Since M5 the non-Extension Library version is no longer under active development. If you are on 9.0+, you get the Extension Library as core. If you are on 8.5.3, install the Extension Library via UP1 - your applications will be better if you leverage the Extension Library.
Providing a custom error page is in use in the application, uncaught SSJS errors (i.e. errors where you don't have a try/catch block) will also be logged.
Flexible APIs for caught errors from SSJS.
Efficient logging from SSJS - all logging is done in the render response phase and if the same SSJS error/ event is triggered multiple times during the JSF lifecycle, it will only be processed once.
YouTube video to show how to implement it http://www.youtube.com/watch?v=mbZ8vamCNpE. Since M6, now use OpenLogUtil from Java instead of OpenLogItem
Thanks to Nathan Freeman, Tim Tripcony, Rene Winkelmeyer, Toby Samples for helping point me in the right direction on some technical difficulties.
Thanks, Nathan, for suggesting falling back to notes.ini.
Thanks, Mark Leusink, for pointing me in the direction of code in XPage Debug Toolbar project to access SSJS error line numbers etc, but fortunately I found out how to find the relevant properties from the underlying Java class, so took a different route.
Nathan is listed as a contributor because of his work on refactoring the original Java classes used for XPages Help Application that provided a starting point for this project.