Closed vbanos closed 5 years ago
Hey @vbanos, yaml is a better config file format that json (I heard that first from @kngenie and I agree). Can we switch this to use yaml?
Yes, I totally agree YAML is better. I use it for everything.
We would have to add PyYAML
as a dependency, this is why I did it with JSON. If thats OK, I'd be happy to switch to YAML.
Oh I see. I didn't realize warcprox didn't have pyyaml as a dependency yet. Yeah I think that's fine, you can add it.
OK, I switched from JSON to YAML.
Looks great, except, could you switch it to pyyaml>=5.1
and use yaml.safe_load()
? No need to get stuck with an old version and use a potentially unsafe code path, seems to me.
NP, its done :)
Thanks!
New option
--logging-conf-file
to loadlogging
conf from a JSON file.Prefer JSON over the
configparser
format supported bylogging.config.fileConfig
because JSON format is much better (nesting is supported) and its easier to detect errors.