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

@@ -10,6 +10,7 @@ import * as TelemetryUtils from 'sql/platform/telemetry/telemetryUtilities';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IBackupService, TaskExecutionMode } from 'sql/platform/backup/common/backupService';
import { invalidProvider } from 'sql/base/common/errors';
import { ILogService } from 'vs/platform/log/common/log';
export class BackupService implements IBackupService {
@@ -18,7 +19,8 @@ export class BackupService implements IBackupService {
constructor(
@IConnectionManagementService private _connectionService: IConnectionManagementService,
@ITelemetryService private _telemetryService: ITelemetryService
@ITelemetryService private _telemetryService: ITelemetryService,
@ILogService private logService: ILogService
) {
}
@@ -43,7 +45,7 @@ export class BackupService implements IBackupService {
return new Promise<azdata.BackupResponse>((resolve, reject) => {
const providerResult = this.getProvider(connectionUri);
if (providerResult) {
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.BackupCreated, { provider: providerResult.providerName });
TelemetryUtils.addTelemetry(this._telemetryService, this.logService, TelemetryKeys.BackupCreated, { provider: providerResult.providerName });
providerResult.provider.backup(connectionUri, backupInfo, taskExecutionMode).then(result => {
resolve(result);
}, error => {