Skip to main content

Logs

The TEN framework supports running extensions developed in different languages within the same process. This creates the need to view logs from all extensions in a unified format, which makes debugging easier.

To support this, the ten_env provides a logging API. Within each extension callback, you can access an instance of ten_env and use it to output logs. This allows logs from extensions written in different languages to appear in a single, consistent output.

The logging API takes two primary parameters: the log level and the message. For convenience, the API also includes simplified variants that require only the message.

The example shows the unified log output for extensions written in multiple languages:

Unified log output for multi-language extensions