openNotesLog (NotesLog - JavaScript)

Opens a specified Domino® database for logging.

Defined in

NotesLog

Syntax

openNotesLog(server:string, database:string) : void
Parameter Description
String server The server on which the database log resides. Use null or an empty string ("") to indicate the current computer: a local database if the agent runs on a workstation; a database on that server if the agent runs on a server.
String database The path and file name of the database.

Usage

One document is created in the database for each error or action that you log. Each document contains the following items:
Item Contents
Form "Log Entry"
A$PROGNAME The ProgramName property
A$LOGTIME The date and time that the error or action is logged
A$USER The user at the time the error or action is logged
A$LOGTYPE "Error" or "Action"
A$ACTION A description of the action (actions only)
A$ERRCODE The error code (errors only)
A$ERRMSG A description of the error (errors only)

The StdR4AgentLog template

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

Opening a database

An agent that attempts to open a database to which it does not have access returns an error. You need at least Reader access to a database 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.