Skip to content

Block all logging when expanded_ai_logging is not passed

Problem to solve

expanded_ai_logging FF was introduced as way to control from AIGW logging for AI features. However, only a few calls are actually disabled, which is not expected behaviour

Proposal

When expanded_ai_logging is disabled, no logs should be captured.

  1. To achieve this, we should create a custom logger that checks the feature flag on every call to info, debug or error.
  2. FastApi logs should be redirected to the logging file, and also blocked if expanded_ai_logging is disabled

This will guarantee customers on self-hosted are not logging by mistake.

Links / references

Edited by David O'Regan