Jeremiah Lowin commited on
Commit
8057dc1
·
unverified ·
2 Parent(s): d51028dff141a2

Merge pull request #51 from sd2k/use-stderr-for-logs

Browse files
Files changed (1) hide show
  1. src/fastmcp/utilities/logging.py +4 -1
src/fastmcp/utilities/logging.py CHANGED
@@ -3,6 +3,7 @@
3
  import logging
4
  from typing import Literal
5
 
 
6
  from rich.logging import RichHandler
7
 
8
 
@@ -27,5 +28,7 @@ def configure_logging(
27
  level: the log level to use
28
  """
29
  logging.basicConfig(
30
- level=level, format="%(message)s", handlers=[RichHandler(rich_tracebacks=True)]
 
 
31
  )
 
3
  import logging
4
  from typing import Literal
5
 
6
+ from rich.console import Console
7
  from rich.logging import RichHandler
8
 
9
 
 
28
  level: the log level to use
29
  """
30
  logging.basicConfig(
31
+ level=level,
32
+ format="%(message)s",
33
+ handlers=[RichHandler(console=Console(stderr=True), rich_tracebacks=True)],
34
  )