Add timestamps to logs

This commit is contained in:
Juhani Haverinen 2016-07-25 14:40:09 +03:00
parent ee7a55e9e1
commit 0b63f049b3
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import socket
import stat
import subprocess
import threading
import time
# Config
port = 7070
@ -309,5 +310,5 @@ while True:
if not any(map(lambda x: matchaddr(toint(ip), x), blacklist)):
Serve(conn).start()
else:
print 'Blacklisted IP %s' % ip
print '%s: Blacklisted IP %s' % (time.strftime('%Y-%m-%d %H:%M'), ip)
conn.close()