0
votes

I developed an notes application called "agent monitoring" which will trigger email daily when the schedule agent prints an error in the log.nsf file.

2017-03-28 09:39:42 AMgr: Agent ('GoSAP' in '\DomApps\GoSAP.nsf') error message: MQJE001: Completion Code '2', Reason '2033'.

I search for details using an "error message" regular expression string in the log and then send email.

Now I would like to handle when the agent hangs. I think it can be done if we get details from the default agent log as shown here.

Can somebody please guide me on how to achieve this?

2
It's not best practice to write in the log.nsf, an application log is much better. See the OpenLog project at openntf: openntf.org/main.nsf/project.xsp?r=project/OpenLog/summaryEmmanuel Gleizer
@EmmanuelGleizer : Thanks for your prompt reply. I don't write the above error message in the log. That is default format written on the log by agentmanager when agent encounters error. How we can know the scheduled agent hand using lotusscript?user3493803
My remark about application log was for "2017-03-28 09:39:42 AMgr: Agent ('GoSAP' in '\DomApps\GoSAP.nsf') error message: MQJE001: Completion Code '2', Reason '2033'." I search briefly how to get (programmatically ) the Agent log (but as in experts-exchange.com/questions/20531806/… it doesn't seems to be possible)Emmanuel Gleizer
@EmmanuelGleizer: I got another idea of getting whether the agent run successfully or not using this notes.ini setting. www-01.ibm.com/support/docview.wss?uid=swg21228274user3493803
Yes this is a good idea, especially if you already parse the log.nsf, you will have all the searched information in one place.Emmanuel Gleizer

2 Answers

0
votes

The agent log can be accessed this way.

0
votes

[EDIT]==> look at @Richard Schwartz response, it seems possible with NotesDXLExporter.

[Original response] This is not possible programmatically in Notes.

Remark: if you have a client running, you can use sendkey (windows dll not the notes function that is buggy) to display the log.

This question has also been asked years ago in experts-exchange also without solution there.