Q

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

Dig deeper on Lotus Notes Domino Agents

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

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:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.uk

Close