On Oct 7, 2009, at 10:49 AM, Vinay Sajip wrote:
All three of the contenders for the title of "commonly found
configuration
mechanism" - JSON, YAML and Python code - will be expressible, in
Python, as
Python dicts. So it seems to make sense to add, to logging.config, a
new
callable bound to "dictConfig" which will take a single dictionary
argument and
configure logging from that dictionary.
I've had bad experiences in the past with dictionary-based APIs. They
seem "simpler" in the short run, because the user "only needs to
create some dictionaries". Once the complexity of that nested
dictionary grows to a certain point, though, one has to refer back to
documentation constantly to make sure the structure conforms to the
"schema". Building a simple config tree using light-weight classes
with documented APIs tends to be more sustainable in the long run.
Doug
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com