I'm trying to configure my Python logging module using logging.config.dictConfig()
However, my JSON file appears to be corrupt even though it works as a Python dict with false changed to False, so I don't think it's a syntax error.
My code says:
import json
with open('logging_config.json') as f:
d = json.load(f)
My logging_config.json file is:
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"standard": {
"format": "[%(levelname)s] %(name)s: %(message)s"
},
},
"handlers": {
"default": {
"level": "DEBUG",
"formatter": "standard",
"class": "logging.StreamHandler",
},
},
"loggers": {
"": {
"handlers": ["default"],
"level": "INFO",
"propagate": true
},
"myfunc": {
"handlers": ["default"],
"level": "DEBUG",
"propagate": false
},
}
}
When I run that simple program, I get an error: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 8 column 3 (char 156)
What could be causing the JSON decoder to fail?
Thanks in advance for any help.
jsonmodule