diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-02-25 12:15:12 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-02-25 12:15:12 -0600 |
commit | 86f0ff75e3538b45b23c251d3a7c31496fe8f39a (patch) | |
tree | 00b5729e05a29a07e6effc1cdac6cf00a0042ec5 /mediagoblin/init | |
parent | a49c741f1141e8b9ff6022ebeddc4ad335fdab8a (diff) | |
download | mediagoblin-86f0ff75e3538b45b23c251d3a7c31496fe8f39a.tar.lz mediagoblin-86f0ff75e3538b45b23c251d3a7c31496fe8f39a.tar.xz mediagoblin-86f0ff75e3538b45b23c251d3a7c31496fe8f39a.zip |
You can now set the PASTE_CONFIG environment variable to control logging setup
So this should work:
PASTE_CONFIG=/path/to/paste_foo.ini ./lazycelery.sh
Thanks to Laurent Fournier for sponsoring this commit!
Diffstat (limited to 'mediagoblin/init')
-rw-r--r-- | mediagoblin/init/celery/from_celery.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mediagoblin/init/celery/from_celery.py b/mediagoblin/init/celery/from_celery.py index 29037d10..5c99ddff 100644 --- a/mediagoblin/init/celery/from_celery.py +++ b/mediagoblin/init/celery/from_celery.py @@ -35,6 +35,11 @@ def setup_logging_from_paste_ini(loglevel, **kw): else: logging_conf_file = 'paste.ini' + # allow users to set up explicitly which paste file to check via the + # PASTE_CONFIG environment variable + logging_conf_file = os.environ.get( + 'PASTE_CONFIG', logging_conf_file) + if not os.path.exists(logging_conf_file): raise IOError('{0} does not exist. Logging can not be set up.'.format( logging_conf_file)) |