Start page / Template development / Scripting / Log outputs

Logging in scripts

Depending on the context of a script, log output can be written in the log files of FirstSpirit. Various methods are available for this.

INFO Logging
The log output is added in front of the "INFO" string and is used to display general information from the script.

context.logInfo("Infotext");

DEBUG Logging
Inserting the "DEBUG" string in front of the actual log output makes it clear it involves troubleshooting or debugging output.

context.logDebug("A Debug Output");

WARN Logging
"WARN" in front of the log output signals that it involves a critical error message (WARNING) for the script run.

context.logWarning("Warning if a critical error occurs.");

ERROR Logging
"ERROR" is placed in front of the log output and signals a fatal error.

context.logError("A fatal error has occurred.");

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy