Loading TOC...


alert.makeLogAction() as Object


Create a standard logging action named "log". Rules that reference this action must provide an directory property that specifies where the log file should be created. The inserted document will have a random long integer ID and its filename will be ID.json within the specified directory.

Rules that reference this action may also provide options with an permission property containing a series of permission properties and/or an collections object containing collection properties that specify the permissions and collections for the log document. This information is simply passed through to xdmp.documentInsert. An example of the rule's options is as follows:
The log document insertion will be performed as the user who created the rule, and the user must have permission to create documents in any collections they specify. The log-id is a random number chosen by the action.


  var alert = require("/MarkLogic/alert.xqy");


Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.