In my code, I wanted to create the virtual environment manually by calling def cli_run(args, options=None): , but when I ran it, I found that my log could not be obtained. Through searching, I found that you clarified the root log in the code, which made me unable to use my log object after running.
I wonder what you're doing this for? Do you use custom Log objects instead of cleaning the root Log ?
|
LOGGER.setLevel(logging.NOTSET) |
|
def _clean_handlers(log): |
|
for log_handler in list(log.handlers): # remove handlers of libraries |
|
log.removeHandler(log_handler) |
I now can do a patch or duplicate the code of cli_run, session_via_cli, and build_parser and remove the line _do_report_setup .
In my code, I wanted to create the virtual environment manually by calling
def cli_run(args, options=None):, but when I ran it, I found that my log could not be obtained. Through searching, I found that you clarified the root log in the code, which made me unable to use my log object after running.I wonder what you're doing this for? Do you use custom Log objects instead of cleaning the root Log ?
virtualenv/src/virtualenv/report.py
Line 39 in 16f80ac
virtualenv/src/virtualenv/report.py
Lines 48 to 50 in 16f80ac
I now can do a patch or duplicate the code of
cli_run,session_via_cli, and build_parser and remove the line_do_report_setup.