summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorroot <root@ire.retiolum>2013-01-29 18:57:49 +0100
committerroot <root@ire.retiolum>2013-01-29 18:57:49 +0100
commitc17d13380945c0909adeddd2375c1c9c8aa26782 (patch)
treeebb5aa23c4277c64c412cffda468973418076624 /services
parent96d04da93bcbd42e8d1b419fea659e5eb8764437 (diff)
//services test-server: log only if debug_log == 'true'
Diffstat (limited to 'services')
-rw-r--r--services/Makefile1
-rwxr-xr-xservices/test-server.py8
2 files changed, 6 insertions, 3 deletions
diff --git a/services/Makefile b/services/Makefile
index 61e0f529..37931f47 100644
--- a/services/Makefile
+++ b/services/Makefile
@@ -1,5 +1,6 @@
help:;@cat Makefile
export authorized_keys_file := authorized_keys
+export debug_log := true
export services_file := services.txt
export host_key_file := test.key
export services_home := /opt/services
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: