diff options
author | root <root@ire.retiolum> | 2013-01-29 18:57:49 +0100 |
---|---|---|
committer | root <root@ire.retiolum> | 2013-01-29 18:57:49 +0100 |
commit | c17d13380945c0909adeddd2375c1c9c8aa26782 (patch) | |
tree | ebb5aa23c4277c64c412cffda468973418076624 /services/test-server.py | |
parent | 96d04da93bcbd42e8d1b419fea659e5eb8764437 (diff) |
//services test-server: log only if debug_log == 'true'
Diffstat (limited to 'services/test-server.py')
-rwxr-xr-x | services/test-server.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/services/test-server.py b/services/test-server.py index ce8fbaa4..7838e0af 100755 --- a/services/test-server.py +++ b/services/test-server.py @@ -3,6 +3,7 @@ from os import environ as env authorized_keys_file = env.get('authorized_keys_file', '/dev/null') +debug_log = env.get('debug_log', 'false') services_file = env.get('services_file', '/dev/null') host_key_file = env.get('host_key_file', '/dev/null') host_key_pub_file = host_key_file + '.pub' @@ -22,9 +23,10 @@ from twisted.internet.reactor import listenTCP, run from twisted.python.components import registerAdapter from zope.interface import implements -from twisted.python.log import startLogging -from sys import stderr -startLogging(stderr) +if debug_log == 'true': + from twisted.python.log import startLogging + from sys import stderr + startLogging(stderr) class MyRealm: |