mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 05:54:19 +02:00
Fix log_level from fastmcp.json treated as transport parameter
Pass log_level from fastmcp.json deployment config as a transport kwarg to server.run_async(), similar to how host/port are handled. This allows the HTTP transport to properly configure logging without modifying global settings. Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
This commit is contained in:
parent
2df8a0f915
commit
35e3e7e3a6
2 changed files with 4 additions and 3 deletions
|
|
@ -184,8 +184,8 @@ async def run_command(
|
|||
kwargs["port"] = port
|
||||
if path:
|
||||
kwargs["path"] = path
|
||||
# Note: log_level is not currently supported by run_async
|
||||
# TODO: Add log_level support to server.run_async
|
||||
if log_level:
|
||||
kwargs["log_level"] = log_level
|
||||
|
||||
if not show_banner:
|
||||
kwargs["show_banner"] = False
|
||||
|
|
|
|||
|
|
@ -403,7 +403,8 @@ class MCPServerConfig(BaseModel):
|
|||
run_args["port"] = self.deployment.port
|
||||
if self.deployment.path:
|
||||
run_args["path"] = self.deployment.path
|
||||
# Note: log_level not currently supported by run_async
|
||||
if self.deployment.log_level:
|
||||
run_args["log_level"] = self.deployment.log_level
|
||||
|
||||
# Override with any provided kwargs
|
||||
run_args.update(kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue