A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-October/092801.html below:

[Python-Dev] A new way to configure logging

[Python-Dev] A new way to configure loggingDoug Hellmann doug.hellmann at gmail.com
Thu Oct 8 14:21:15 CEST 2009
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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4