faststream
faststream copied to clipboard
Feature: Allow configuring "use_colors" in the logger
Is your feature request related to a problem? Please describe.
The built-logger is configured to always add colors, even when passing a logger to faststream. This is hardcoded here https://github.com/ag2ai/faststream/blob/main/faststream/_internal/logger/logging.py#L80 This affects systems collecting logs from faststream hosts. This makes loga generated by faststream to show in raw text as "\033[36mDEBUG\033[0m" instead of DEBUG.
Describe the solution you'd like
Make the use_colors param configurable instead of a hardcoded value.
Describe alternatives you've considered Writing a custom log parser.