# 02 · dictconfig-full **演示**:`logging.config.dictConfig` 一次声明 formatter / handler / logger:同一日志同时写控制台与文件,`propagate: False` 避免重复输出。 **运行**: ```sh uv run python examples/38-observability-otel/02-dictconfig-full/dictconfig_full.py ``` **预期输出**(3.12.9): ```text INFO obs.dict hello WARNING obs.dict warn file_lines: ['INFO obs.dict hello', 'WARNING obs.dict warn'] ``` **依赖**:仅标准库。 **注意**:`dictConfig` 默认 `disable_existing_loggers=True`,会静默关掉已创建的 logger;务必显式设为 `False`。`ext://sys.stdout` 是配置里的对象引用语法。