Remove logging and clone utlities (#5309)

* remove log utility functions; remove custom mixin

* fix tests

* add log service as required by telemetry utils

* remove unused code

* replace some console.logs with logservice
This commit is contained in:
Anthony Dresser
2019-05-04 22:37:15 -07:00
committed by GitHub
parent df7645e4e5
commit ab0cd71d10
80 changed files with 439 additions and 383 deletions

View File

@@ -25,6 +25,7 @@ import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import * as TelemetryUtils from 'sql/platform/telemetry/telemetryUtilities';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { invalidProvider } from 'sql/base/common/errors';
import { ILogService } from 'vs/platform/log/common/log';
export class RestoreService implements IRestoreService {
@@ -33,7 +34,8 @@ export class RestoreService implements IRestoreService {
constructor(
@IConnectionManagementService private _connectionService: IConnectionManagementService,
@ITelemetryService private _telemetryService: ITelemetryService
@ITelemetryService private _telemetryService: ITelemetryService,
@ILogService private logService: ILogService
) {
}
@@ -62,7 +64,7 @@ export class RestoreService implements IRestoreService {
return new Promise<azdata.RestoreResponse>((resolve, reject) => {
const providerResult = this.getProvider(connectionUri);
if (providerResult) {
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.RestoreRequested, { provider: providerResult.providerName });
TelemetryUtils.addTelemetry(this._telemetryService, this.logService, TelemetryKeys.RestoreRequested, { provider: providerResult.providerName });
providerResult.provider.restore(connectionUri, restoreInfo).then(result => {
resolve(result);
}, error => {