mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
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:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user