Message166484
Initial evaluation indicates that ast.literal_eval doesn't cut the mustard: it doesn't do any name lookups, so you can't for example successfully evaluate something like 'handlers.WatchedFileHandler' or even 'FileHandler'.
However, a limited evaluator which goes further than ast.literal_eval will probably work. One such is shown in this Gist:
https://gist.github.com/3182304
It supports a reasonable subset of Python expressions and also could be useful in other contexts than logging configuration. |
|
Date |
User |
Action |
Args |
2012-07-26 14:29:44 | vinay.sajip | set | recipients:
+ vinay.sajip, ncoghlan, Arfrever |
2012-07-26 14:29:44 | vinay.sajip | set | messageid: <1343312984.08.0.717908276863.issue15452@psf.upfronthosting.co.za> |
2012-07-26 14:29:42 | vinay.sajip | link | issue15452 messages |
2012-07-26 14:29:42 | vinay.sajip | create | |
|