involve kwargs to pass parameters on creating RichHandler for logging customization. (#1504)

This commit is contained in:
itaru2622 2025-08-16 00:37:17 +09:00 committed by GitHub
commit 3555ac96c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -29,7 +29,7 @@ Get a logger nested under FastMCP namespace.
### `configure_logging` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/logging.py#L22" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
configure_logging(level: Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] | int = 'INFO', logger: logging.Logger | None = None, enable_rich_tracebacks: bool = True) -> None
configure_logging(level: Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] | int = 'INFO', logger: logging.Logger | None = None, enable_rich_tracebacks: bool = True, **rich_kwargs: Any) -> None
```
@ -38,4 +38,5 @@ Configure logging for FastMCP.
**Args:**
- `logger`: the logger to configure
- `level`: the log level to use
- `rich_kwargs`: the parameters to use for creating RichHandler