Adds Functionality to Logger

This commit is contained in:
2023-04-27 05:14:07 -03:00
parent 2d488bd749
commit 9c822c6848
5 changed files with 177 additions and 87 deletions

View File

@@ -1,5 +1,6 @@
from diceplayer.shared.interface.dice_interface import DiceInterface
from diceplayer.player import Player
from diceplayer import logger
from pathlib import Path
import argparse
@@ -40,6 +41,7 @@ def main():
args = parser.parse_args()
# Open OUTFILE for writing and print keywords and initial info
logger.set_logger(args.outfile, logging.INFO)
try:
@@ -55,12 +57,6 @@ def main():
except Exception as err:
sys.exit(err)
logging.basicConfig(
filename=args.outfile,
format='%(message)s',
level=logging.INFO
)
player = Player(args.infile)
player.start()