Moved the logger details to cipherbreak.py
authorNeil Smith <neil.git@njae.me.uk>
Thu, 3 Apr 2014 19:55:51 +0000 (20:55 +0100)
committerNeil Smith <neil.git@njae.me.uk>
Thu, 3 Apr 2014 19:55:51 +0000 (20:55 +0100)
cipher.py
cipherbreak.py

index a09c3438a64728e32bdc625bff8af847f18d2df7..11bdde67916ca1303a1c6ce6d1318001d5233061 100644 (file)
--- a/cipher.py
+++ b/cipher.py
@@ -1,16 +1,9 @@
 import string
 import collections
-import logging
 import math
 from itertools import zip_longest, cycle, chain
 from language_models import *
 
-logger = logging.getLogger(__name__)
-logger.addHandler(logging.FileHandler('cipher.log'))
-logger.setLevel(logging.WARNING)
-#logger.setLevel(logging.INFO)
-#logger.setLevel(logging.DEBUG)
-
 
 modular_division_table = [[0]*26 for _ in range(26)]
 for a in range(26):
index 17df97af0d7ee6769a8789ec1eee74a92a369ef8..95b5c208975c5035a2b2c2f50d5c3ebeb5f6bb8a 100644 (file)
@@ -9,6 +9,12 @@ from math import log10
 
 import matplotlib.pyplot as plt
 
+logger = logging.getLogger(__name__)
+logger.addHandler(logging.FileHandler('cipher.log'))
+logger.setLevel(logging.WARNING)
+#logger.setLevel(logging.INFO)
+#logger.setLevel(logging.DEBUG)
+
 from cipher import *
 from language_models import *