diff options
author | Marko Kreen | 2010-10-12 11:39:26 +0000 |
---|---|---|
committer | Marko Kreen | 2010-10-12 11:39:26 +0000 |
commit | 3d8304f9c14f674539c3be1cbb06f399c06a72ce (patch) | |
tree | f143a8eb7938c7a039e634efc44502e661df21fb /python/skytools/scripting.py | |
parent | 9d4d75156f19f4cadbbfa223e4c2f438e6737a92 (diff) |
use defa sklog
Diffstat (limited to 'python/skytools/scripting.py')
-rw-r--r-- | python/skytools/scripting.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/python/skytools/scripting.py b/python/skytools/scripting.py index 4be3aee3..e6d7abfa 100644 --- a/python/skytools/scripting.py +++ b/python/skytools/scripting.py @@ -11,6 +11,12 @@ from skytools.psycopgwrapper import connect_database from skytools.quoting import quote_statement import skytools.skylog, psycopg2 +try: + import skytools.installer_config + default_skylog = skytools.installer_config.skylog +except ImportError: + default_skylog = 0 + __pychecker__ = 'no-badexcept' #: how old connections need to be closed @@ -136,7 +142,7 @@ def _init_log(job_name, service_name, cf, log_level, is_daemon): global _log_init_done, _log_config_done got_skylog = 0 - use_skylog = cf.getint("use_skylog", 0) + use_skylog = cf.getint("use_skylog", default_skylog) # if non-daemon, avoid skylog if script is running on console. # set use_skylog=2 to disable. |