Пример #1
0
def getRandomLogEntry(fileName):
    line = random.choice(open(fileName).readlines())
    entry = LogEntry(line)
    now = datetime.now(timezone.utc)
    entry.timeStamp = now.astimezone()
    return entry
Пример #2
0
def getRandomLogEntry(fileName):
    line = random.choice(open(fileName).readlines())
    entry = LogEntry(line)
    now = datetime.now(timezone.utc)
    entry.timeStamp = now.astimezone()
    return entry
Пример #3
0
def generateLogEntry():
    line = '188.127.233.220 - - [22/Jan/2016:09:35:54 +0100] "GET /almhuette-raith.at.tgz HTTP/1.1" 200 228'
    entry = LogEntry(line)
    now = datetime.now(timezone.utc)
    entry.timeStamp = now.astimezone()
    return entry
Пример #4
0
def generateLogEntry():
    line = '188.127.233.220 - - [22/Jan/2016:09:35:54 +0100] "GET /almhuette-raith.at.tgz HTTP/1.1" 200 228'
    entry = LogEntry(line)
    now = datetime.now(timezone.utc)
    entry.timeStamp = now.astimezone()
    return entry