Not gonna lie, I gave up and used `structlog` instead.
But if you’re set on python logging dictconfig json, here’s what tripped me up:
- Make sure your JSON is *valid*. Like, no trailing commas—Python’s JSON parser hates those.
- Double-check your handler *class* paths. `"class": "logging.FileHandler"` vs `"class": "logging.StreamHandler"` matters.
Also, `logging_tree` is a cool tool to debug your setup. Just `pip install logging_tree` and run it to see what’s *actually* happening.
But if you’re set on python logging dictconfig json, here’s what tripped me up:
- Make sure your JSON is *valid*. Like, no trailing commas—Python’s JSON parser hates those.
- Double-check your handler *class* paths. `"class": "logging.FileHandler"` vs `"class": "logging.StreamHandler"` matters.
Also, `logging_tree` is a cool tool to debug your setup. Just `pip install logging_tree` and run it to see what’s *actually* happening.
