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
Post a Comment