How to Enable File Logging for an SSO Application in io.Connect Desktop 9.0

Applies to: io.Connect Desktop (9.x version stream)

Problem

When using an SSO application in io.Connect Desktop, logs from window.io.logger appear in the browser console but are not written to any log files (e.g., application.log or a dedicated SSO application log file). The Logger API initializes successfully, sub-loggers are created correctly, and log messages appear in the browser console with proper formatting, but no entries are persisted to disk.

Solution

Step 1: Enable Logging in the App Definition

Add "allowLogging": true to the top level of your SSO application definition JSON file:

{
  "name": "sso-application",
  "title": "My SSO Login",
  "type": "window",
  "allowLogging": true,
  "details": {
    "url": "http://localhost:3000",
    "mode": "tab",
    "autoInjectAPI": {
      "enabled": true,
      "autoInit": true
    }
  }
}

Step 2: Add the "out" Appender to logger.json

Ensure your logger.json file (located in <installation_location>/interop.io/io.Connect Desktop/Desktop/config) includes the "out" appender of type "stdout" under the "appenders" section.

"out": {
  "type": "stdout"
}

Step 3: Verify the Publish Level

The Logger API has a publishLevel() method that controls which log entries are written to the file. If the publish level is set too high (e.g., "warn"), lower-level messages like "info" or "debug" will not appear in the log files. You can check or set it via the Logger API — see the Logger API – JavaScript documentation for details.

Note for io.Connect Desktop 10.0 and Later

Starting with io.Connect Desktop 10.0, the logging configuration has moved from the standalone logger.json file to the "logging" > "configuration" property in the system.json system configuration file. The logger.json approach described above applies to the 9.0 version stream. If you are running io.Connect Desktop 10.0 or later, configure your custom appenders and categories under the "logging" key in system.json instead. The Gilding Configuration (gilding.json) is also relevant only for the 9.0 version stream.

Related Documentation