info('Serving on %s port %s', *server.server_address)
try:
    server.serve_forever()
finally:
    info('quit.')
if __name__ == '__main__':
    test()
How to add logging to a file with timestamps to a Python TCP Server for Raspberry Pi