Commiting part 1 of the problem statement which involves parsing logs, b...

...uilding documents and indexing them into ES
In development.ini,  add a line
LOGDIRECTORY = "~/search_logs"

import pyramid
settings = pyramid.threadlocal.get_current_registry().settings
logdirectory = settings['LOGDIRECTORY']

log_file = "%s/search_sample_log.gz" % logdirectory
search_log = gzip.open(log_file, "r")

We can development.ini and production.ini files and the logs get appropriately read.