def parselog(loglines, fields):

	"""
	Parse a subset of a zeek logfile's contents.  Each line's fields are
	put into a hash with the retrieved field names as the key.  Each of
	those hashed entries are appended to a list of hashed entries.
	That list is returned to the caller.
	"""

	zeekcomm = []				# Hashed communications.
	fcnt = len(fields)			# Number of fields in output.

	#
	# Build the list of hashed entries.
	# 
	for ln in loglines:
		entry = {}

		#
		# Remove comment lines and strip off any leading and
		# trailing whitespace.
		#
		ln = ln.strip()
		if(ln == ''):
			continue
		if(ln.startswith('#') == True):
			continue

		#
		# Split the line into its constituent atoms.
		#
		atoms = ln.split("\t")

		#
		# Put the atoms into a hash, keyed off the field.
		#
		for ind in range(fcnt):
			entry[fields[ind]] = atoms[ind]

		#
		# Add the new entry hash to our big list of entry hashes.
		#
		zeekcomm.append(entry)

	return(zeekcomm)