MCPcopy Index your code
hub / github.com/tadata-org/fastapi_mcp / LoggingConfig

Class LoggingConfig

examples/shared/setup.py:6–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class LoggingConfig(BaseModel):
7 LOGGER_NAME: str = "fastapi_mcp"
8 LOG_FORMAT: str = "%(levelprefix)s %(asctime)s\t[%(name)s] %(message)s"
9 LOG_LEVEL: str = logging.getLevelName(logging.DEBUG)
10
11 version: int = 1
12 disable_existing_loggers: bool = False
13 formatters: dict = {
14 "default": {
15 "()": "uvicorn.logging.DefaultFormatter",
16 "fmt": LOG_FORMAT,
17 "datefmt": "%Y-%m-%d %H:%M:%S",
18 },
19 }
20 handlers: dict = {
21 "default": {
22 "formatter": "default",
23 "class": "logging.StreamHandler",
24 "stream": "ext://sys.stdout",
25 },
26 }
27 loggers: dict = {
28 "": {"handlers": ["default"], "level": LOG_LEVEL}, # Root logger
29 "uvicorn": {"handlers": ["default"], "level": LOG_LEVEL},
30 LOGGER_NAME: {"handlers": ["default"], "level": LOG_LEVEL},
31 }
32
33
34def setup_logging():

Callers 1

setup_loggingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…