mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 13:04:18 +02:00
Merge pull request #51 from sd2k/use-stderr-for-logs
fix: use stderr for logging
This commit is contained in:
commit
e0ead26963
1 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import logging
|
||||
from typing import Literal
|
||||
|
||||
from rich.console import Console
|
||||
from rich.logging import RichHandler
|
||||
|
||||
|
||||
|
|
@ -27,5 +28,7 @@ def configure_logging(
|
|||
level: the log level to use
|
||||
"""
|
||||
logging.basicConfig(
|
||||
level=level, format="%(message)s", handlers=[RichHandler(rich_tracebacks=True)]
|
||||
level=level,
|
||||
format="%(message)s",
|
||||
handlers=[RichHandler(console=Console(stderr=True), rich_tracebacks=True)],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue