Skip to content

Commit

Permalink
request service: logs
Browse files Browse the repository at this point in the history
related to #41680
  • Loading branch information
joaomoreno committed Feb 13, 2018
1 parent ae6677b commit 7923fa9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/platform/request/node/requestService.ts
Expand Up @@ -11,6 +11,7 @@ import { IRequestOptions, IRequestContext, IRequestFunction, request } from 'vs/
import { getProxyAgent } from 'vs/base/node/proxy';
import { IRequestService, IHTTPConfiguration } from 'vs/platform/request/node/request';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ILogService } from '../../log/common/log';

/**
* This service exposes the `request` API, while using the global
Expand All @@ -26,7 +27,8 @@ export class RequestService implements IRequestService {
private disposables: IDisposable[] = [];

constructor(
@IConfigurationService configurationService: IConfigurationService
@IConfigurationService configurationService: IConfigurationService,
@ILogService private logService: ILogService
) {
this.configure(configurationService.getValue<IHTTPConfiguration>());
configurationService.onDidChangeConfiguration(() => this.configure(configurationService.getValue()), this, this.disposables);
Expand All @@ -39,6 +41,8 @@ export class RequestService implements IRequestService {
}

async request(options: IRequestOptions, requestFn: IRequestFunction = request): TPromise<IRequestContext> {
this.logService.trace('RequestService#request', options.url);

const { proxyUrl, strictSSL } = this;

options.agent = options.agent || await getProxyAgent(options.url, { proxyUrl, strictSSL });
Expand Down

0 comments on commit 7923fa9

Please sign in to comment.