import re
def logs():
logs = []
w = '(?P<host>(?:d+.){3}d+)s+(?:S+)s+(?P<user_name>S+)s+[(?P<time>[-+ws:/]+)]s+"(?P<request>.+?.+?)"'
with open("assets/logdata.txt", "r") as f:
logdata = f.read()
for m in re.finditer(w, logdata):
logs.append(m.groupdict())
return logs