Set timeout and log level for socket