I am evaluating to use the Openlog Logger in my XPages application [https://www.openntf.org/main.nsf/project.xsp?r=project/XPages%20OpenLog%20Logger] but I notice that each time I call Openlog.LogEvent method that the message is stored in a separate Notes document entry.

I have a lot of debug statements which I would like to capture but more in a summary document, not individual documents.

Loading a page in my application can display multiple objects via MVC so loading page can lead to a large number of event logging calls...

    Collect your messages in a global string variable or a scope variable and call Openlog.LogEvent at the end with the collected messages as parameter.

    Each message has a different stack trace. If you have a message in a central function, it can be useful to know what the stack trace was that triggered that message. I've often found that useful when I couldn't work out why a piece of code got triggered. If they're aggregated, the stack trace would only be the last call.

    The downside of Knut's approach is that if an error occurs before the final call to OpenLog.logEvent, nothing would get logged, which I can envisage would be problematic.

    However, because OpenLog uses a PhaseListener to log everything out even if there's an error, I could add a new bean that captures debug messages and output that at the end of the lifecycle. An OpenLogUtil method could be used to more easily access that. However, it wouldn't be usable outside the XPages runtime.

    Are you writing your debug message from Java? And can you confirm you're using the OSGi plugin version?

    Obviously any additions to XPages OpenLog Logger get added at the same time to OpenNTF Domino API ;-).

      Your Answer


      By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

      Not the answer you're looking for? Browse other questions tagged or ask your own question.