
console.trace( message as xs.anyAtomicType, [valueN as xs.anyAtomicType,...] ) as null
Logs a message and the JavaScript stack trace 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.
function a() {
console.trace("value=%d ", 123);
}
function b() {
a();
}
function c() {
b();
}
c();
// Output similar to the following is logged:
// 2015-07-31 14:39:14.923 Info: App-Services: Trace: value=123
// 2015-07-31 14:39:14.923 Info: App-Services: at a ([anonymous]:2:11)
// 2015-07-31 14:39:14.923 Info: App-Services: at b ([anonymous]:7:3)
// 2015-07-31 14:39:14.923 Info: App-Services: at c ([anonymous]:11:3)
// 2015-07-31 14:39:14.923 Info: App-Services: at ([anonymous]:14:1)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.