-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow bypassing log setup in the API use #1896
Comments
We're using our own log reporters to guarantee output, without clearing the logs we might generate our output in unwanted locations. For your use case, I think would be helpful to have an option to disable log setup. Though now one might argue that the output controlling flags would be unrespected. |
Thank you for your reply. I understand what you mean. If you want to avoid this, I think you can readjust the invocation logic to leave the interfaces for third-party applications. Not as tightly coupled In fact, I think the upper layer of the function module should be the CMD call layer in the design. When other projects need to use it, the corresponding function module can be directly used. Of course, given that Virtualenv is already a mature scenario, I've only been thinking about it by looking at its source code, perhaps prematurely. Please don't mind. In my current practice, I copied three methods You can also do this through a Subprocess call, but it may take more work on process control and exception handling. Of course I wish there was a more elegant way to solve this problem. Thank you again. |
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
.The text was updated successfully, but these errors were encountered: