ALBS-901: New service albs-oval-errata-dif #1

Merged
kzhukov merged 11 commits from ALBS-901 into main 2023-01-11 10:43:42 +00:00
2 changed files with 3 additions and 5 deletions
Showing only changes of commit b1fc8b4281 - Show all commits

View File

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

View File

@ -89,12 +89,9 @@ def start(yaml_path: str):
path.parent.mkdir() path.parent.mkdir()
# configuring logging # 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, logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(levelname)s %(funcName)s %(message)s', 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") logging.info("Trying to load diff file from disk")
try: try: