ftos.logging.log

IMPORTANT!  
Starting with v24.3.0, this is renamed from log to ftos.logging.log.

Saves a log a message in the trace_roll.log file located in the root of the web application.

This is a method suitable for all business service components modules.

For detailed information about log management, such as logs anonymization or enabling logs based on conditions, see the Platform Administration Guide.

Syntax

Copy
function ftos.logging.log(message: string, {level: 'debug' | 'info' | 'warning' | 'error' | 'fatal'}): void
 
Parameter Type Description
message string Message to be logged.
level optional 'debug' | 'info' | 'warning' | 'error' | 'fatal' Optional label for the severity level of the log message.
IMPORTANT!  
Use log level warning when importing business log entries.

If the level is not specified, then the default is info. In logging systems, log levels follow a hierarchy. If the SDK is set to Information, it will only record messages at that level or higher (e.g., Warning, Error, Critical). Since Debug is a lower level, those messages will be ignored.

The hierarchy is Debug < Information < Warning < Error < Fatal

This hierarchy is important when working with the sdkLogLevel parameter in Configuration Manager. For example, if you set the sdkLogLevel to warning, then you need to specify the log level in the SDK method as warning or error in order to record such logs. If no level is specified when using the method, then it defaults to information which is lower than warning, and thus those logs won't be recorded.

Examples