Removed unnecessary log handlers

This commit is contained in:
Kirill Zhukov 2022-12-30 16:25:42 +01:00
parent 9a1045e638
commit b1fc8b4281
2 changed files with 3 additions and 5 deletions

View File

@ -7,5 +7,6 @@ from albs_oval_errata_diff.start import start
try:
YAML_PATH = sys.argv[1]
except IndexError:
print(f"Usage {sys.argv[0]} config.yml")
print(f"Usage: {sys.argv[0]} config.yml")
sys.exit(1)
start(YAML_PATH)

View File

@ -89,12 +89,9 @@ def start(yaml_path: str):
path.parent.mkdir()
# configuring logging
handlers = [logging.FileHandler(config.log_file, mode='a'),
logging.StreamHandler(),
RotatingFileHandler(config.log_file, maxBytes=10000, backupCount=3)]
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(levelname)s %(funcName)s %(message)s',
handlers=handlers)
handlers=[RotatingFileHandler(config.log_file, maxBytes=10000000, backupCount=3)])
logging.info("Trying to load diff file from disk")
try: