For the complete documentation index, see llms.txt. This page is also available as Markdown.

Logging information and errors

More information: Logging in ScriptCode

The logging and exception-throwing mechanisms in ScriptCode allow monitoring the course of business logic, diagnosing problems, and controlled interruption of the application’s operation in the event of business rule violations.

Event logging (Object Logger)

The Eximee platform automatically logs the input parameters passed to scripts. If it is necessary to manually record additional information, a global object is available Logger.

The recommended logging levels in ScriptCode are:

  • Logger.info(message, ...args) – for logging the standard course of business operations.

  • Logger.warn(message, ...args) – for logging unusual situations that do not interrupt the script but need to be noted.

Data masking and the function nonsensitive()

For security reasons, values passed to logs are automatically masked. If a variable contains data that is completely safe (e.g. does not contain personal data) and must be explicitly visible in logs (e.g. a technical dictionary identifier, a parameter name), use the function nonsensitive().

Logger.info(
    'COMPLETE TASK EXECUTED [arg1={}, arg2={}]',
    nonsensitive('arg1 nonsensitive test'),
    'arg2'
);

In this example:

  • arg1 will be logged in plain text,

  • arg2 will be hidden (replaced by a sensitive data marker).

Example of available logging methods

Messages in the object Logger support parameterization using curly braces {}.

Last updated

Was this helpful?