virttest.remote: Change default log_function for remote_login
The old remote_login used a utils_logfile.log_line log_function by
default, making it convenient to set the output log file. Let's bring
back the default by changing None to our log function.
This can change the log_function in case people explicitly select
log_function to None but it should not matter as the function is only
used when log_filename is set. So the only effect would be when one
chooses to set the log_filename but deliberately wanted to disable
logging via the log_function, which should be very rare.
Fixes: #2822
This pull request introduces 1 alert when merging 839095eb523787a43f4da1f6fcc898012394e199 into 289df7d72b8e58f7b10ff17c5c113d67104d6fbf - view on LGTM.com
new alerts:
- 1 for Wrong number of arguments in a call
@ldoktor I am afraid this patch can not fix the issue. The function login in virt_vm.py keep calling the remote_login from aexpect.
https://github.com/avocado-framework/avocado-vt/blob/8d5fffe59920c5e844a3adb28655e9f6024fdd48/virttest/virt_vm.py#L1102
How about my proposal in the related issue?
@yanan-fu, can you try/comment on my proposal too? I think the current PR might be an overkill to begin with.