Log (Java™)
Enables you to record actions and errors that take place during a program's execution. You can record actions and errors in:
- A Domino® database
- A mail memo
- A file (for programs that run locally)
- An agent log (for agents)
Syntax
public class Log extends Base
Containment
Contained by: Session
Properties
IsLogActions through isLogActions and setLogActions
IsLogErrors through isLogErrors and setLogErrors
IsOverwriteFile through isOverwriteFile and setOverwriteFile
NumActions through getNumActions
NumErrors through getNumErrors
Parent through getParent
ProgramName through getProgramName and setProgramName
Methods
recycle
toString
Creation
To create a new log, use createLog in Session.
Usage
Once you create a log, you use one of the following methods to open it before you begin logging:
- To log to a database, use openNotesLog.
- To log to a mail memo, use openMailLog.
- To log to a file (only available to programs running locally), use openFileLog.
- To log to an agent log (only available to agents), use openAgentLog.
You must explicitly log each action and error using the following methods:
Actions and errors are not automatically logged.
System.out writes to an Events document ("Miscellaneous Events" view) in the log.nsf database where the code executes for:
- Scheduled agents
- Agents started by run or runOnServer