The method "getMessage()" returns the content of the whole SSJS library whre the error occurs. This text may be bigger than 32ko...
Storing this text into a simple text field "LogMessage" works fine but prevents you later from reading generated documents in OpenLog.nsf database : you get the message "Field Is too Large (32K)..."
So I propose to modify the class OpenLogItem, public static boolean writeToLog() :
// logDoc.replaceItemValue("LogMessage", getMessage());
RichTextItem rtItem = logDoc.createRichTextItem("LogMessage");
rtItem.appendText(getMessage());
This solved the problem for me.