Docly Developers
Function API only Updated 17 Oct 2026

console.warn(values)

Writes a warning to the site's console log — the same as console.log, but the line is marked as a warning (Type "warn").

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

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 the line goes to the server's own output, which you cannot see.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
console.warn("Price missing, using 0", { product: "A-100" });