summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPierce Lopez <pierce.lopez@gmail.com>2017-02-23 01:46:04 -0500
committerJeff Forcier <jeff@bitprophet.org>2017-02-23 12:37:42 -0800
commitc86a59be6378bb4d9e4b729dc85a0dd3002f4cd8 (patch)
treebc184c068988f782ca54d2d2a967dfe15a12e69a
parentae0bac09273fbd0fa3927906caebea6dfcc9c9b4 (diff)
log_to_file() should append instead of replace
-rw-r--r--paramiko/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/util.py b/paramiko/util.py
index 5ad1e3fd..b69e8882 100644
--- a/paramiko/util.py
+++ b/paramiko/util.py
@@ -241,7 +241,7 @@ def log_to_file(filename, level=DEBUG):
if len(l.handlers) > 0:
return
l.setLevel(level)
- f = open(filename, 'w')
+ f = open(filename, 'a')
lh = logging.StreamHandler(f)
lh.setFormatter(logging.Formatter('%(levelname)-.3s [%(asctime)s.%(msecs)03d] thr=%(_threadid)-3d %(name)s: %(message)s',
'%Y%m%d-%H:%M:%S'))