mozilla-services / metlog-py

INACTIVE - http://mzl.la/ghe-archive - Python library for Services metrics logging
36 stars 8 forks source link

move `plugin_param` to a `plugins` sub-dict of the `config` dictionary in `client_from_dict_config` #16

Closed rafrombrc closed 12 years ago

rafrombrc commented 12 years ago

metlog.config.client_from_dict_config currently expects separate config and plugin_param dictionaries. The former contains most of the client configuration in dictionary format, while the latter contains a separate dictionary containing config info for the various extension plug-ins.

This works, but it complicates downstream code that depends on the client_from_dict_config API by requiring them to know about the possibility of there being a separate plugin_param argument. If we make sure that all necessary config info is always embedded within the single config dictionary, then new config features can be supported w/o any glue code needing to be aware of the changes, they'll just pass the single dictionary in as before. To this end, then, I'd rather see the plugin config dictionary stored inside the main config dict, as config['plugins'].

rafrombrc commented 12 years ago

Looks good, thanks!: https://github.com/mozilla-services/metlog-py/commit/e300df5c19a080a03743fd23246e7187d0766ed7