mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
added rotating file handler close #93
This commit is contained in:
parent
6419839b85
commit
95c51bba91
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ def safeName(name):
|
|||
def nzbtomedia_configure_logging(dirname):
|
||||
logFile = os.path.join(dirname, "postprocess.log")
|
||||
logging.config.fileConfig(os.path.join(dirname, "autoProcessMedia.cfg"))
|
||||
fileHandler = logging.FileHandler(logFile, encoding='utf-8', delay=True)
|
||||
fileHandler = logging.handlers.RotatingFileHandler(logFile, mode='a', maxBytes=20000, backupCount=1, encoding='utf-8', delay=True)
|
||||
fileHandler.formatter = logging.Formatter('%(asctime)s|%(levelname)-7.7s %(message)s', '%H:%M:%S')
|
||||
fileHandler.level = logging.DEBUG
|
||||
logging.getLogger().addHandler(fileHandler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue