Factorize connection parameters, check log level