# filter_logs

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/utils/filter_logs)

Temporarily adds specified filters to a logger.

Parameters:
- logger: The logger to which the filters will be added.
- filters: A sequence of `logging.Filter` objects to be temporarily added
    to the logger.

## Signature

```python
filter_logs(
    logger: logging.Logger,
    filters: Sequence[logging.Filter],
) -> Generator[None, None, None]
```

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/791701a304a72495d108669ef11c194983fd0e95/python/langsmith/utils.py#L503)