python - Appending the log file using logging -


i have written code something. have started log when ever start program, log files not appending instead starting fresh. how can append log every time start script.

my code follows[only relevant section]:

import paramiko import logging logging.config import fileconfig  paramiko.util.log_to_file("versionscanner" + '.log') logging.basicconfig(filename='versionscanner.log', level=logging.debug) 

i using both paramiko [ssh level logs ] , logging application logging. there way using 'a' appending here?

it seems paramiko @ fault here. specific line this one :f = open(filename, 'w').

in order go around this, should declare logger name paramiko , give desired configuration.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -