Skip to main content

OpenNotesLog (NotesLog - LotusScript)

Opens a specified Domino® database for logging.

Defined in

NotesLog

Syntax

Call notesLog .OpenNotesLog( server$ , dbfile$ )

Parameters

server$

String. The server on which the database log resides. Use an empty string ("") to indicate the current computer. If the script runs on the workstation, the empty string indicates a local database. If the script runs on a server, it indicates a database on that server.

dbfile$

String. The path and file name of the database. If you specify "" for a server name, you must specify the full path to the log database, including the drive letter.

Usage

One document is created in the database for each error or action that you log. Each document has a Form item set to "Log Entry" and contains the following items:

ItemContents
A$PROGNAMEThe ProgramName property
A$LOGTIMEThe date and time that the error or action was logged
A$USERThe user of the script at the time the error or action was logged
A$LOGTYPEIndicates either "Error" or "Action"
A$ACTIONA description of the action (actions only)
A$ERRCODEThe error code (errors only)
A$ERRMSGA description of the error (errors only)

The StdR4AgentLog template

The StdR4AgentLog template (ALOG4.NTF) is designed to display the action and error documents that a NotesLog creates. If the dbfile$ you specify inherits its design from this template, you can use the database's main view to see each of the items listed previously. Several agents can log to the same server$ and dbfile$. The database categorizes each action and error according to the A$PROGNAME item.

Opening a database

A script that attempts to open a database to which it does not have access returns an error. A script needs at least Reader access to a database in order to open it.

Logging actions and errors

For information on how actions and errors get logged to a database log, see the LogAction and LogError methods.

Example