<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.log.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.log</api:function-name><api:suggest>xdmp.log</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>log</api:suggest><api:function-link mode="xquery" fullname="xdmp:log">/apidoc/8.0/xdmp:log.xml</api:function-link><api:function mode="javascript" name="log" type="builtin" lib="xdmp" category="Extension" subcategory="MarkLogic Server" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.log"><api:summary>
  Logs a message to the log file
  <code xmlns="http://www.w3.org/1999/xhtml">&lt;install_dir&gt;/Logs/ErrorLog.txt</code>.
  The log message is sent as soon as this function is called, even if the
  program from which it is called has not completed.
</api:summary><api:params><api:param name="msg" type="ValueIterator | Object | String | Array | Null | Number | Boolean" class="javascript"><api:param-description>
    Message for logging.
  </api:param-description><api:param-name>msg</api:param-name><api:param-type>ValueIterator | Object | String | Array | Null | Number | Boolean</api:param-type></api:param><api:param name="level" type="xs:string?" optional="true"><api:param-description>
    One of: emergency, alert, critical, error, warning, notice, info,
      config, debug, fine, finer, or finest. The default level is "info".
  </api:param-description><api:param-name>level</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return>null</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.log("AAAA");
=&gt; () and sends an info-level log message to ErrorLog.txt with the text "AAAA"
</pre></api:example></api:function></api:function-page>