logger
Frame logging utilities for debugging and monitoring frame flow in Pipecat pipelines.
- class pipecat.processors.logger.FrameLogger(prefix='Frame', color: str | None = None, ignored_frame_types: tuple[type[~pipecat.frames.frames.Frame], ...] = (<class 'pipecat.frames.frames.BotSpeakingFrame'>, <class 'pipecat.frames.frames.UserSpeakingFrame'>, <class 'pipecat.frames.frames.InputAudioRawFrame'>, <class 'pipecat.frames.frames.OutputAudioRawFrame'>))[source]
Bases:
FrameProcessorA frame processor that logs frame information for debugging purposes.
This processor intercepts frames passing through the pipeline and logs their details with configurable formatting and filtering. Useful for debugging frame flow and understanding pipeline behavior.
- __init__(prefix='Frame', color: str | None = None, ignored_frame_types: tuple[type[~pipecat.frames.frames.Frame], ...] = (<class 'pipecat.frames.frames.BotSpeakingFrame'>, <class 'pipecat.frames.frames.UserSpeakingFrame'>, <class 'pipecat.frames.frames.InputAudioRawFrame'>, <class 'pipecat.frames.frames.OutputAudioRawFrame'>))[source]
Initialize the frame logger.
- Parameters:
prefix – Text prefix to add to log messages. Defaults to “Frame”.
color – ANSI color code for log message formatting. If None, no coloring is applied.
ignored_frame_types – Tuple of frame types to exclude from logging. Defaults to common high-frequency frames like audio and speaking frames.
- async process_frame(frame: Frame, direction: FrameDirection)[source]
Process and log frame information.
- Parameters:
frame – The frame to process and potentially log.
direction – The direction of frame flow in the pipeline.