mirror of
https://github.com/KevinMidboe/transatlanticTorrentExpress.git
synced 2025-10-29 18:00:19 +00:00
Changed severity levels on some logs
This commit is contained in:
@@ -7,7 +7,7 @@ from configparser import ConfigParser
|
|||||||
from logger import logger
|
from logger import logger
|
||||||
|
|
||||||
def getConfig():
|
def getConfig():
|
||||||
logger.info('Reading config')
|
logger.debug('Reading config')
|
||||||
pwd = os.path.dirname(os.path.abspath(__file__))
|
pwd = os.path.dirname(os.path.abspath(__file__))
|
||||||
path = os.path.join(pwd, 'config.ini')
|
path = os.path.join(pwd, 'config.ini')
|
||||||
|
|
||||||
@@ -18,11 +18,12 @@ def getConfig():
|
|||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read(path)
|
config.read(path)
|
||||||
|
|
||||||
logger.info('Sections parsed: {}'.format(config.sections()))
|
logger.debug('Sections parsed: {}'.format(config.sections()))
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
def getFiles(path, host=None, user=None):
|
def getFiles(path, host=None, user=None):
|
||||||
|
logger.info('Getting filenames from path: {}'.format(path))
|
||||||
if (host and user):
|
if (host and user):
|
||||||
cmd = 'ssh {}@{} ls {}'.format(user, host, path)
|
cmd = 'ssh {}@{} ls {}'.format(user, host, path)
|
||||||
else:
|
else:
|
||||||
@@ -61,7 +62,7 @@ def transferFiles(files, localPath, remotePath, host=None, user=None):
|
|||||||
if stderr:
|
if stderr:
|
||||||
logger.error('Rsync error: {}'.format(stderr))
|
logger.error('Rsync error: {}'.format(stderr))
|
||||||
|
|
||||||
logger.info('Rsync output: {}'.format(stdout))
|
logger.debug('Rsync output: {}'.format(stdout))
|
||||||
transferedFiles.append(file)
|
transferedFiles.append(file)
|
||||||
|
|
||||||
return transferedFiles
|
return transferedFiles
|
||||||
@@ -81,7 +82,7 @@ def removeFromDeluge(execScript, files):
|
|||||||
if stderr:
|
if stderr:
|
||||||
logger.error('Deluge error: {}'.format(stderr))
|
logger.error('Deluge error: {}'.format(stderr))
|
||||||
|
|
||||||
logger.info('Deluge output: {}'.format(stdout))
|
logger.debug('Deluge output: {}'.format(stdout))
|
||||||
logger.info('Successfully removed: {}'.format(file))
|
logger.info('Successfully removed: {}'.format(file))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user