telmich/cdist — pull request #298 by dheule (2014-02-13 13:26:52+00:00)
Title: Feature logging and better cache dir handling

This PR is the biggest work I have done so far, it includes:
* new cache dir handling (create a dir between cache and host, for each run, so you don't have only the last logs and results ... )
* Now you can export CDIST_LOGCFG to tell cdist that you have a python logging config file in JSON format
* With this config file, you can log to files, syslog, email and others. Configurable per target host or many other conditions... you (the admin) are the commander...
* Eliminates cdist.log class which does in a complex way what the logging framework can do with one line of code ;-)

to discuss:
I have included an example code which imports a JSON file. In theory, we have two options, JSON or YAML. I used JSON because it is in the python core, YAML needs an external module ... but YAML syntax is much simpler to write ... if you think YAML would be better, I can add test if the yaml module is available and then decide according to the syntax in the file, if it is YAML or JSON

what do you think, nico and steven ?