mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
This commit is contained in:
parent
2e74ccc37a
commit
2bbedfae65
1 changed files with 14 additions and 0 deletions
14
nzbToMediaUtil.py
Normal file
14
nzbToMediaUtil.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
|
||||
import logging
|
||||
import logging.config
|
||||
import os.path
|
||||
|
||||
|
||||
def nzbtomedia_configure_logging(dirname):
|
||||
logFile = os.path.join(dirname, "postprocess.log")
|
||||
logging.config.fileConfig(os.path.join(dirname, "logger.conf"))
|
||||
fileHandler = logging.FileHandler(logFile, 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