From: Neil Smith Date: Thu, 3 Apr 2014 19:55:51 +0000 (+0100) Subject: Moved the logger details to cipherbreak.py X-Git-Url: https://git.njae.me.uk/?p=cipher-training.git;a=commitdiff_plain;h=c66d9937e6ce523f9db7602997ad5e2924dfd7ec Moved the logger details to cipherbreak.py --- diff --git a/cipher.py b/cipher.py index a09c343..11bdde6 100644 --- 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): diff --git a/cipherbreak.py b/cipherbreak.py index 17df97a..95b5c20 100644 --- a/cipherbreak.py +++ b/cipherbreak.py @@ -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 *