Configure logging for chuk framework components. Args: suppress: If True, suppress INFO/DEBUG logs. If False, allow all.
(suppress: bool = True)
| 229 | |
| 230 | |
| 231 | def configure_mcp_server_logging(suppress: bool = True) -> None: |
| 232 | """ |
| 233 | Configure logging for chuk framework components. |
| 234 | |
| 235 | Args: |
| 236 | suppress: If True, suppress INFO/DEBUG logs. If False, allow all. |
| 237 | """ |
| 238 | # Generic chuk framework loggers |
| 239 | framework_loggers = [ |
| 240 | "chuk_mcp_runtime", |
| 241 | "chuk_sessions", |
| 242 | "chuk_artifacts", |
| 243 | ] |
| 244 | |
| 245 | target_level = logging.CRITICAL if suppress else logging.INFO |
| 246 | |
| 247 | for logger_name in framework_loggers: |
| 248 | logger = logging.getLogger(logger_name) |
| 249 | logger.setLevel(target_level) |
| 250 | if suppress: |
| 251 | logger.propagate = False |
| 252 | if not logger.handlers: |
| 253 | logger.addHandler(logging.NullHandler()) |
| 254 | |
| 255 | |
| 256 | def setup_silent_mcp_environment() -> None: |
no outgoing calls