Skip to content

Commit e0ead26

Browse files
authored
Merge pull request #51 from sd2k/use-stderr-for-logs
fix: use stderr for logging
2 parents 5ddec50 + 8cce799 commit e0ead26

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fastmcp/utilities/logging.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
from typing import Literal
55

6+
from rich.console import Console
67
from rich.logging import RichHandler
78

89

@@ -27,5 +28,7 @@ def configure_logging(
2728
level: the log level to use
2829
"""
2930
logging.basicConfig(
30-
level=level, format="%(message)s", handlers=[RichHandler(rich_tracebacks=True)]
31+
level=level,
32+
format="%(message)s",
33+
handlers=[RichHandler(console=Console(stderr=True), rich_tracebacks=True)],
3134
)

0 commit comments

Comments
 (0)