Examples: openFileLog method
- This agent opens a file called append.TXT in the Domino® directory. Each action and error gets
appended to the file on a separate line without writing over the existing
contents of the file.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Log log = session.createLog("Append to file");
log.openFileLog("append.log");
log.logAction("Logged an action");
} catch(Exception e) {
e.printStackTrace();
}
}
}
- This agent opens a file called over.TXT in the Domino® directory. Each action and error gets
appended to the file on a separate line after first writing over the
existing contents of the file.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Log log = session.createLog("Overwrite file");
log.setOverwriteFile(true);
log.openFileLog("over.log");
log.logAction("Logged an action");
} catch(Exception e) {
e.printStackTrace();
}
}
}
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.