-
Notifications
You must be signed in to change notification settings - Fork 29
Log spawning of processes #756
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
Conversation
| cp.exec(command, (err, stdout) => { | ||
| if (err) { | ||
| traceVerbose(`Error running command: ${command}`, err); | ||
| traceError(`Error running command: ${command} (${timer.elapsedTime})`, err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely if success is info, then failure must be warning/error or info, but not something less
| return available.promise; | ||
| } | ||
|
|
||
| log?.info(`Running: uv --version`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the code is right here, as log is optional
And looking at the calling code, it isn't passed
Not sure why, I'd try to resolve this in debt, as logger shouldn't be optional. we either turn off logging or the like, but wouldn't make the logger component optional.
| const deferred = createDeferred<string>(); | ||
| args = quoteArgs(args); | ||
| const timer = new StopWatch(); | ||
| deferred.promise.finally(() => traceInfo(`Ran conda in ${timer.elapsedTime}: ${conda} ${args.join(' ')}`)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't logged this at all, now we will.
We know conda is slow
| const exec = promisify(cp.exec); | ||
| function execCommand(command: string) { | ||
| const timer = new StopWatch(); | ||
| return promisify(cp.exec)(command, { windowsHide: true }).finally(() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't logged this at all, now we will.
I believe we've seen delays in reading registry in the past as well.
For microsoft/vscode#266411