Ask the Expert

Information on using LogEvent in NotesLog class

I am trying to find information on using the LogEvent method in the NotesLog class. Can you shed any light on implementation? Here's a sample of what I have:
(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.

As you have the agent set up here, the LogEvent method is set to be used on servers to generate Domino events on the network, for tools that monitor events, e.g., the NotesView product. What you need to do is Call an openLog method to open the log type you want –- file, mail memo, agent log or a Notes log.

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: