Domino Code Fragment

Code Name*
IsOverwriteFile property
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.15.146.184
Description*
1. This script opens the over.txt file for logging. The existing contents of the file are removed before any actions or errors are logged.
Type*
Java
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
import lotus.notes.*;


public class overwritefileagent extends AgentBase
{
 public void NotesMain()
 {
   try
   {
     Session s = getSession();
     Log log = s.createLog("Overwrite file");
     log.setOverwriteFile(true);
     log.openFileLog("over.log");
     log.logAction("Logged an action");
   }
   catch (Exception e)
   {
     e.printStackTrace();
   }
 }
}