Cleaned logger initialisation
authorNeil Smith <neil.git@njae.me.uk>
Tue, 8 Nov 2016 11:00:23 +0000 (11:00 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Wed, 4 Oct 2017 08:22:44 +0000 (09:22 +0100)
cipherbreak.py

index 02e63c5ffd4a8f0b375e2144d2d8278c8d648fd6..4f443c419e8d27cfb8746d8f52a262cf7d19bff2 100644 (file)
@@ -13,11 +13,11 @@ from multiprocessing import Pool
 
 import matplotlib.pyplot as plt
 
+logging.basicConfig(filename="cipher.log", level=logging.INFO)
 logger = logging.getLogger(__name__)
-logger.addHandler(logging.FileHandler('cipher.log'))
-logger.setLevel(logging.WARNING)
-#logger.setLevel(logging.INFO)
-#logger.setLevel(logging.DEBUG)
+# logger.setLevel(logging.WARNING)
+# logger.setLevel(logging.INFO)
+# logger.setLevel(logging.DEBUG)
 
 from cipher import *
 from language_models import *