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

Plugin Logger

We provide plugin developers with a way to communicate to users while the plugin is being run, through log messages.

You will need to use the PluginLogger class, documented below:

ango.plugin_logger.PluginLogger

Parameters

  • name: str

  • plugin_id: str

  • org_id: str

  • run_by: str

  • session: str

  • plugin: socketio.ClientNamespace

  • level: logging.NOTSET

Functions

The only difference between these functions is the word used at the beginning of the log, between "WARNING, ERROR, DEBUG, and INFO." All four only emit log messages.

  • warning(msg, *args, **kwargs)

  • error(msg, *args, **kwargs)

  • debug(msg, *args, **kwargs)

  • info(msg, *args, **kwargs)

Controlling plugin process log verbosity

When running a plugin script, you can set the LOGLEVEL environment variable to control the verbosity of the Python plugin process logs.

If LOGLEVEL is not set, the SDK uses INFO.

For example:

LOGLEVEL accepts standard Python logging levels, such as DEBUG, INFO, WARNING, ERROR, and CRITICAL. Setting LOGLEVEL to WARNING hides lower-priority process logs such as INFO and DEBUG output.

This setting controls the Python process logging level. It is separate from plugin-specific configuration options such as logging_frequency, and it should not be used as the main way to control which status messages your plugin sends to Ango Hub users through logger.info(), logger.warning(), logger.error(), or logger.debug().

Code Sample

How log messages are shown to users

Users can see the log messages you send with the Logger class by opening the Plugin Sessions dialog and expanding the row for the plugin session where they'd like to see the logs:

Last updated