次のエージェントは、アクションのログ記録を無効にしたり有効にしたりします。
import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Log log = session.createLog("Turning actions on and
off");
Vector v = new Vector();
v.addElement(session.getUserName());
log.openMailLog(v, "Here's your log");
log.setLogActions(false);
log.logAction("This action does not get logged");
log.setLogActions(true);
log.logAction("This action does get logged");
log.close();
} catch(Exception e) {
e.printStackTrace();
}
}
}