console.dir( obj as xs.anyAtomicType, [options as xs.anyAtomicType] ) as null
Logs an object to the App Server log file
<install_dir>/Logs/<port>_ErrorLog.txt
; where
<install_dir>
is the MarkLogic install directory,
and <port>
is the port number of the current App
Server or "TaskServer" if the current request is running on the Task
Server.
const obj = { field1: { field2: { field3: { field4: 'value' } } } }; console.dir(obj) // output logged is: // { field1: { field2: { field3: [Object] } } }
const obj = { field1: { field2: { field3: { field4: 'value' } } } }; console.dir(obj, {depth: 1}) // output logged is: // { field1: { field2: [Object] } }
const obj = { field1: { field2: { field3: { field4: 'value' } } } }; console.dir(obj, {depth: null}) // output logged is: // { field1: { field2: { field3: { field4: 'value' } } } }
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.