summaryrefslogtreecommitdiffhomepage
path: root/demo_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'demo_server.py')
-rwxr-xr-xdemo_server.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/demo_server.py b/demo_server.py
index 6447d4a0..5d6cbb5c 100755
--- a/demo_server.py
+++ b/demo_server.py
@@ -1,16 +1,10 @@
#!/usr/bin/python
-import sys, os, socket, threading, logging, traceback, base64
+import sys, os, socket, threading, traceback, base64
import paramiko
# setup logging
-l = logging.getLogger("paramiko")
-l.setLevel(logging.DEBUG)
-if len(l.handlers) == 0:
- f = open('demo_server.log', 'w')
- lh = logging.StreamHandler(f)
- lh.setFormatter(logging.Formatter('%(levelname)-.3s [%(asctime)s] %(name)s: %(message)s', '%Y%m%d:%H%M%S'))
- l.addHandler(lh)
+paramiko.util.log_to_file('demo_server.log')
#host_key = paramiko.RSAKey()
#host_key.read_private_key_file('demo_rsa_key')