pjs.log()
The pjs.log() API logs a line of code along with field values to the console. This is useful in debugging. The API is normally used internally by the command line parameter --rlog to the start.js script, which starts a Profound.js instance. The line number, the line of code itself, and field name / value pairs are logged.
JavaScript syntax highlighting is automatically applied to the line.
Parameters
Line number
Line
Field Names Array
Example
pjs.define("a", { type: "integer" });
pjs.define("b", { type: "integer", initValue: 15 });
pjs.define("c", { type: "integer", intiValue: 5 });
a = b / c;
pjs.log(4, "a = b / c;", ["a", "b", "c"]);
Â
// The following will be send to the console
// 4: a = b / c; // a=3, b=15, c=5