mcp-mesh 0.7.11__py3-none-any.whl → 0.7.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
_mcp_mesh/__init__.py CHANGED
@@ -31,7 +31,7 @@ from .engine.decorator_registry import (
31
31
  get_decorator_stats,
32
32
  )
33
33
 
34
- __version__ = "0.7.11"
34
+ __version__ = "0.7.12"
35
35
 
36
36
  # Store reference to runtime processor if initialized
37
37
  _runtime_processor = None
@@ -31,7 +31,11 @@ class SafeStreamHandler(logging.StreamHandler):
31
31
 
32
32
 
33
33
  def configure_logging():
34
- """Configure logging based on MCP_MESH_LOG_LEVEL environment variable."""
34
+ """Configure logging based on MCP_MESH_LOG_LEVEL environment variable.
35
+
36
+ Uses allowlist approach: root logger stays at INFO to keep third-party libs quiet,
37
+ only mcp-mesh loggers are elevated to DEBUG when debug mode is enabled.
38
+ """
35
39
  # Get log level from environment, default to INFO
36
40
  log_level_str = os.environ.get("MCP_MESH_LOG_LEVEL", "INFO").upper()
37
41
 
@@ -53,8 +57,6 @@ def configure_logging():
53
57
  "1",
54
58
  "yes",
55
59
  )
56
- if debug_mode:
57
- log_level = logging.DEBUG
58
60
 
59
61
  # Clear any existing handlers to avoid conflicts
60
62
  root_logger = logging.getLogger()
@@ -63,23 +65,29 @@ def configure_logging():
63
65
 
64
66
  # Configure with safe stream handler for background threads
65
67
  handler = SafeStreamHandler(sys.stdout)
66
- handler.setLevel(log_level)
68
+ handler.setLevel(logging.DEBUG) # Handler allows all, loggers filter
67
69
  handler.setFormatter(logging.Formatter("%(levelname)-8s %(message)s"))
68
70
 
69
71
  root_logger.addHandler(handler)
70
- root_logger.setLevel(log_level)
71
72
 
72
- # Set level for all mcp_mesh loggers (both mcp_mesh and _mcp_mesh namespaces)
73
- logging.getLogger("mcp_mesh").setLevel(log_level)
74
- logging.getLogger("_mcp_mesh").setLevel(log_level)
73
+ # Root logger always INFO - all third-party libs stay quiet
74
+ # This is the allowlist approach: instead of blocklisting noisy loggers one by one,
75
+ # we keep root at INFO and only elevate mcp-mesh loggers to DEBUG
76
+ root_logger.setLevel(logging.INFO)
75
77
 
76
- # Suppress noisy third-party loggers
77
- # docket (task queue used by fastmcp) produces excessive DEBUG logs like
78
- # "Scheduling due tasks", "Getting redeliveries", "Getting new deliveries" in tight loops
79
- logging.getLogger("docket").setLevel(logging.WARNING)
80
-
81
- # Return the configured level for reference
82
- return log_level
78
+ # Only MCP Mesh loggers get DEBUG when debug mode is on
79
+ if debug_mode:
80
+ logging.getLogger("mesh").setLevel(logging.DEBUG)
81
+ logging.getLogger("mcp_mesh").setLevel(logging.DEBUG)
82
+ logging.getLogger("_mcp_mesh").setLevel(logging.DEBUG)
83
+ else:
84
+ # Use the configured log level for mcp-mesh loggers
85
+ logging.getLogger("mesh").setLevel(log_level)
86
+ logging.getLogger("mcp_mesh").setLevel(log_level)
87
+ logging.getLogger("_mcp_mesh").setLevel(log_level)
88
+
89
+ # Return the configured level for reference (DEBUG if debug mode, else configured level)
90
+ return logging.DEBUG if debug_mode else log_level
83
91
 
84
92
 
85
93
  # Configure logging on module import
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-mesh
3
- Version: 0.7.11
3
+ Version: 0.7.12
4
4
  Summary: Kubernetes-native platform for distributed MCP applications
5
5
  Project-URL: Homepage, https://github.com/dhyansraj/mcp-mesh
6
6
  Project-URL: Documentation, https://github.com/dhyansraj/mcp-mesh/tree/main/docs
@@ -1,4 +1,4 @@
1
- _mcp_mesh/__init__.py,sha256=YyIzN6x9OBfdEWJq2A9-8O8byF-947bWhfJAdmVa1ZE,2720
1
+ _mcp_mesh/__init__.py,sha256=w3soaBGglnkpWEdjLZK0RkEEj_6Gt1rvNQnT5rHSH5k,2720
2
2
  _mcp_mesh/engine/__init__.py,sha256=2ennzbo7yJcpkXO9BqN69TruLjJfmJY4Y5VEsG644K4,3630
3
3
  _mcp_mesh/engine/async_mcp_client.py,sha256=UcbQjxtgVfeRw6DHTZhAzN1gkcKlTg-lUPEePRPQWAU,6306
4
4
  _mcp_mesh/engine/base_injector.py,sha256=qzRLZqFP2VvEFagVovkpdldvDmm3VwPHm6tHwV58a2k,5648
@@ -127,7 +127,7 @@ _mcp_mesh/shared/fast_heartbeat_status.py,sha256=OquEsX9ZTbxY1lIsll0Mbb2KDzSJD76
127
127
  _mcp_mesh/shared/fastapi_middleware_manager.py,sha256=_h10dSL9mgQstpJW_ZM2cpkU6yTKaYKlZaKXMk2i6IA,14638
128
128
  _mcp_mesh/shared/health_check_cache.py,sha256=bEdWMBwubK7W01gRCDcZo9NjVQELY4p42fIreeGahZ4,9399
129
129
  _mcp_mesh/shared/host_resolver.py,sha256=ycs6gXnI1zJX5KiqiLJPX5GkHX8r4j8NMHQOlG2J2X8,2964
130
- _mcp_mesh/shared/logging_config.py,sha256=lIljIVd2a_ekWj4isZnNDi4lzaEbPB-nyIapXPAz22c,2748
130
+ _mcp_mesh/shared/logging_config.py,sha256=UvU9IWESaogUiF1PEzjY8kHw2vTIVZnSubRTeL_Hzfc,3251
131
131
  _mcp_mesh/shared/registry_client_wrapper.py,sha256=8x40IzeigI0SFPz44OWgbXCkVrEDgV7N9a8wZ58Lh4Y,21181
132
132
  _mcp_mesh/shared/server_discovery.py,sha256=W5nsN-GvEVFD-7XkbMTxh-9FUIEiyWOxP3GYr8GNi3E,13142
133
133
  _mcp_mesh/shared/simple_shutdown.py,sha256=jnF1rTR2yR619LZnEjNlu-ZdKlB3PovxKqG0VZ3HDgE,8319
@@ -145,7 +145,7 @@ mesh/__init__.py,sha256=0zequaBtd_9NLOLsr9sNONuwWa_fT_-G4LnJ1CHTEY0,3808
145
145
  mesh/decorators.py,sha256=_3yVrEvGHZ5MKX_pf7Zn-vLdOH68iE7o6EIvxKcGOds,57636
146
146
  mesh/helpers.py,sha256=2Iquvco5mDl0Qs_FD4rMiI88Q-sjXEkKitsXw2HS4Jc,9878
147
147
  mesh/types.py,sha256=9TqbJSxlybLQaPVjugcKwPiIrVnJEzqAOvPRhlX1zmo,15559
148
- mcp_mesh-0.7.11.dist-info/METADATA,sha256=gWVztMobWhc0salCmhAZ2STRs6SPBYGtErNDe_RMyLc,4973
149
- mcp_mesh-0.7.11.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
150
- mcp_mesh-0.7.11.dist-info/licenses/LICENSE,sha256=_EBQHRQThv9FPOLc5eFOUdeeRO0mYwChC7cx60dM1tM,1078
151
- mcp_mesh-0.7.11.dist-info/RECORD,,
148
+ mcp_mesh-0.7.12.dist-info/METADATA,sha256=No-OjrsVVHpUkJYbPZdGYHW21Z8FrCZCZ2FipLrr4Xg,4973
149
+ mcp_mesh-0.7.12.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
150
+ mcp_mesh-0.7.12.dist-info/licenses/LICENSE,sha256=_EBQHRQThv9FPOLc5eFOUdeeRO0mYwChC7cx60dM1tM,1078
151
+ mcp_mesh-0.7.12.dist-info/RECORD,,