18.01.2013 Views

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Notes does not automatically log actions or errors. You must explicitly log<br />

each action and error using the following methods:<br />

To log an action, use LogAction.<br />

To log an error, use LogError.<br />

Method Description<br />

New Creates a NotesLog object.<br />

Close Closes a log.<br />

LogAction Records an action in a log.<br />

LogError Records an error in a log.<br />

LogEvent Sends a Notes event out to the network. Only scripts<br />

running on a server can use this method.<br />

OpenAgentLog Starts logging an agent event.<br />

OpenFileLog Starts logging to a specified disk file. This method<br />

returns an error if you call it on a server.<br />

OpenMailLog Opens a new mail memo <strong>for</strong> logging. The memo is<br />

mailed when the log’s Close method is called, or when<br />

the object is deleted.<br />

OpenNotesLog Opens a specified Notes database <strong>for</strong> logging.<br />

Property Description<br />

LogActions Read-Write. Indicates if action logging is enabled or not.<br />

LogErrors Read-Write. Indicates if error logging is enabled or not.<br />

NumActions Read-only. The number of actions logged so far.<br />

NumErrors Read-only. The number of errors logged so far.<br />

OverwriteFile Read-Write. For a log that records to a file, indicates if<br />

the log should write over the existing file or append to<br />

it. This property has no effect on logs that record to a<br />

mail message or database.<br />

ProgramName Read-Write. The name that identifies the script whose<br />

actions and errors you’re logging. The name is the same<br />

as the name specified with New or CreateLog.<br />

Note The methods listed in italics will be available in Release 4.5.<br />

Chapter 3: <strong>LotusScript</strong> Notes Classes 69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!