summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-02-23 12:38:34 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-02-23 12:38:34 -0800
commit5061ee66b1cc0e9cba93be75f0978cd0830362ad (patch)
treec3ebfc647e3a7188221e4c0c0df2e0e39b7e5f3b
parent421f03b7f504c32261d9bf5f19484c7944295a23 (diff)
parenta80bbe0e2dd8768e93feba72f8eeacbe1378262f (diff)
Merge branch '2.1'
-rw-r--r--paramiko/util.py2
-rw-r--r--sites/www/changelog.rst2
2 files changed, 3 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'))
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 10419f5c..9ce03fdc 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,8 @@
Changelog
=========
+* :bug:`683` Make `util.log_to_file()` append instead of replace. Thanks
+ to ``@vlcinsky`` for the report.
* :release:`2.1.2 <2017-02-20>`
* :release:`2.0.5 <2017-02-20>`
* :release:`1.18.2 <2017-02-20>`