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

@@ -6,13 +6,17 @@
import { Subject } from 'rxjs/Subject';
import { Subscription } from 'rxjs/Subscription';
import { warn } from 'sql/base/common/log';
import { IAngularEventingService, IAngularEvent, AngularEventType } from 'sql/platform/angularEventing/common/angularEventingService';
import { ILogService } from 'vs/platform/log/common/log';
export class AngularEventingService implements IAngularEventingService {
public _serviceBrand: any;
private _angularMap = new Map<string, Subject<IAngularEvent>>();
constructor(
@ILogService private readonly logService: ILogService
) { }
public onAngularEvent(uri: string, cb: (event: IAngularEvent) => void): Subscription {
let subject = this._angularMap.get(uri);
if (!subject) {
@@ -26,7 +30,7 @@ export class AngularEventingService implements IAngularEventingService {
public sendAngularEvent(uri: string, event: AngularEventType, payload?: any): void {
const subject = this._angularMap.get(uri);
if (!subject) {
warn('Got request to send an event to a dashboard that has not started listening');
this.logService.warn('Got request to send an event to a dashboard that has not started listening');
} else {
subject.next({ event, payload });
}