(Agent process, called by NotesAgent.
RunOnServer method) 'Agent
Name: "(LogCall) | LogCall"
Sub Initialize
Dim session As New NotesSession
Dim logEvent As NotesLog
Set logEvent = session.CreateLog("MyEventLog")
'These lines can only called when run
on the server - will cause error
if run under client
Call logEvent.LogEvent("MiscAgentTest",
"Misc", EV_MISC, SEV_FAILURE)
Call logEvent.LogEvent("Agent Log Event Test 2",
"Misc", EV_MISC,
SEV_FATAL)
Call logEvent.LogEvent("Agent Log Event Test 3",
"Misc", EV_MISC,
SEV_NORMAL)
Call logEvent.LogEvent("Agent Log Event Test 4",
"Misc", EV_MISC,
SEV_WARNING1)
Call logEvent.LogEvent("MiscAgentTest", "Misc",
EV_MISC, SEV_WARNING2)
Call logEvent.Close
End Sub
When the agent is run, the server console will display:
Agent '(LogCall) | LogCall' error: Notes error: No such queue (MiscAgentTest)
I've searched the LN KBase, this site, Notes.Net and Google. I can not find anything relative to implementing this method.
See the document in your designer help file called "Making a Domino log". Check the examples of all four log types to see how to use the features. To use the log database methods, the database has to exist or be created before you can log to it.
OpenNTF.org also has a more advanced logging application if you need more.
Do you have comments on this Ask the Expert question and response? Let us know.
This was first published in January 2005