markov: bit of debug logging in file import
This commit is contained in:
parent
b82e5309e1
commit
81339a4f16
|
@ -37,6 +37,7 @@ def import_file(request):
|
||||||
|
|
||||||
whos = []
|
whos = []
|
||||||
for line in log_file:
|
for line in log_file:
|
||||||
|
log.debug(line)
|
||||||
(timestamp, who, what) = line.decode('utf-8').split('\t', 2)
|
(timestamp, who, what) = line.decode('utf-8').split('\t', 2)
|
||||||
|
|
||||||
if who in ('-->', '<--', '--', ' *'):
|
if who in ('-->', '<--', '--', ' *'):
|
||||||
|
@ -50,6 +51,7 @@ def import_file(request):
|
||||||
# this is a line we probably care about now
|
# this is a line we probably care about now
|
||||||
what = [x for x in what.rstrip().split(' ') if x not in strips]
|
what = [x for x in what.rstrip().split(' ') if x not in strips]
|
||||||
markovlib.learn_line(' '.join(what), context)
|
markovlib.learn_line(' '.join(what), context)
|
||||||
|
log.debug("learned")
|
||||||
|
|
||||||
log.debug(set(whos))
|
log.debug(set(whos))
|
||||||
form = LogUploadForm()
|
form = LogUploadForm()
|
||||||
|
|
Loading…
Reference in New Issue