Notes Agent Log Class
Have you ever wanted to know how long certain steps of your scheduled agent take? Maybe you're having a performance problem with your scheduled agent or it's timing out and you would like to help pinpoint where your code is slow. You can make use of the built-in agent log for this.To use this functionality, all you will need to add to your LotusScript is a new variable and a few calls. Here is a sample:
Dim agentLog As New NotesLog("Agent Log")
Call agentLog.OpenAgentLog
....... insert some LotusScript code here .......
Call agentLog.LogAction("Done with step 1")
...... insert some LotusScript code here .......
Call agentLog.LogAction("Done with step 2")
....... insert some LotusScript code here .......
Call agentLog.Close
The "OpenAgentLog" method opens the agent log that Notes takes care of normally -- you will just be able to add lines to it. Each call to the "LogAction" method will add a new line to the log with the date and time that it happens.
To look at the results, go into the list of agents in your database. Then highlight your agent and go to the menu option Agent | Log (or you can right-click and choose Log from the pop-up box). A box will pop up showing your agent log. Information in the log will scroll if necessary.