Skip to main content
Glama

Poke MCP Production Server

logger.py1.45 kB
"""Structured logging configuration for Poke MCP Production.""" import sys import structlog from pathlib import Path from typing import Any def get_logger(name: str) -> Any: """Get a configured logger instance. Args: name: Logger name (typically __name__). Returns: Configured structlog logger. """ return structlog.get_logger(name) def configure_logging(log_level: str = "INFO", log_format: str = "json") -> None: """Configure structured logging. Args: log_level: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL). log_format: Output format (json or console). """ # Ensure logs directory exists Path("logs").mkdir(exist_ok=True) # Configure structlog processors = [ structlog.contextvars.merge_contextvars, structlog.processors.add_log_level, structlog.processors.TimeStamper(fmt="iso"), structlog.processors.StackInfoRenderer(), structlog.processors.format_exc_info, ] if log_format == "json": processors.append(structlog.processors.JSONRenderer()) else: processors.append(structlog.dev.ConsoleRenderer()) structlog.configure( processors=processors, wrapper_class=structlog.make_filtering_bound_logger(log_level.upper()), context_class=dict, logger_factory=structlog.PrintLoggerFactory(file=sys.stdout), cache_logger_on_first_use=True, )

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/patrickcarmichael/poke-mcp-production'

If you have feedback or need assistance with the MCP directory API, please join our Discord server