3

I have a Domino Agent (written using Java; does NOT use DIIOP) that resides and executes on a Domino server. The Domino server in my environment is version 9.0.1

I wanted to create and maintain a log file for the agent so that it becomes easy to troubleshoot at runtime. Hence, I started using the Log class to create and maintain a log file for the agent. I specifically use the openFileLog() method and the logAction() method to create the log file and add entries to the log file

The log file is being created fine and I can see the log entries fine however I have run into the following problem -

When the single string/message to log exceeds 256 characters, the log entry gets truncated to 256 characters and I see the following message/error added to that log file entry

* Value length greater than maximum allowed *

Is there a length limit on a single log file entry? Is this customizable OR am I stuck at a maximum of 256 characters per log entry? Any thoughts/suggestions?

Thanks,

user3873843
  • 115
  • 1
  • 4
  • 1
    You may want to consider using the OpenLog class from OpenNTF, which you can find here: http://www.openntf.org/main.nsf/project.xsp?r=project/OpenLog – Richard Schwartz Dec 30 '15 at 16:26

1 Answers1

3

Yes, the limit is 256 characters per log line for logAction().

You can split the string to several log lines though with this method:

private void logAction(Log log, String s) throws NotesException {
    int SPLIT = 256;
    for (int pos = 0; pos < s.length(); pos += SPLIT) {
        log.logAction(s.substring(pos, Math.min(s.length(), pos + SPLIT)));
    }       
}
Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67