Docly Developers
Function API only Updated 17 Oct 2026

console.log(values)

Outputs specified text to the site's console log, same as in JavaScript. console.warn and console.error write the same way, but mark the line as a warning or an error.

Open the log with the Console button while browsing the folder in Docly, or read it from your own code with docly.getConsoleLog.

The log is kept in memory on the server, as a rolling buffer of the last 1000 lines per site. It is cleared when the application restarts or the app pool recycles, so use it for live debugging - write to a file with docly.saveFile if you need a log that survives a restart.

Parameters

valuesanyrequired

One or more values. Objects are written as JSON; several arguments are stored together as one JSON array.

Returns

Nothing. Only API scripts write to the site's console. In pages and templates (.hash files, display templates) console.log, console.warn and console.error do not reach the site console — they write to the server's own output, which you cannot see.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
console.log("Log information");
console.warn("Log a warning");
console.error("Log an error");

// Objects are written as JSON:
console.log({ user : "someone@example.com", items : 3 });

// The lines show up in the Console view for the folder,
// and can be read back with docly.getConsoleLog().
// * Only available in API functions.