Change logger on app to NotificationLogger
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { Credentials } from "./authentication";
|
||||
import { Disposable } from "../pure/disposable-object";
|
||||
import { AppEventEmitter } from "./events";
|
||||
import { Logger } from "./logging";
|
||||
import { NotificationLogger } from "./logging";
|
||||
import { Memento } from "./memento";
|
||||
import { AppCommandManager } from "./commands";
|
||||
|
||||
export interface App {
|
||||
createEventEmitter<T>(): AppEventEmitter<T>;
|
||||
readonly mode: AppMode;
|
||||
readonly logger: Logger;
|
||||
readonly logger: NotificationLogger;
|
||||
readonly subscriptions: Disposable[];
|
||||
readonly extensionPath: string;
|
||||
readonly globalStoragePath: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { VSCodeCredentials } from "./authentication";
|
||||
import { Disposable } from "../../pure/disposable-object";
|
||||
import { App, AppMode, EnvironmentContext } from "../app";
|
||||
import { AppEventEmitter } from "../events";
|
||||
import { extLogger, Logger, queryServerLogger } from "../logging";
|
||||
import { extLogger, NotificationLogger, queryServerLogger } from "../logging";
|
||||
import { Memento } from "../memento";
|
||||
import { VSCodeAppEventEmitter } from "./events";
|
||||
import { AppCommandManager, QueryServerCommandManager } from "../commands";
|
||||
@@ -55,7 +55,7 @@ export class ExtensionApp implements App {
|
||||
}
|
||||
}
|
||||
|
||||
public get logger(): Logger {
|
||||
public get logger(): NotificationLogger {
|
||||
return extLogger;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { Logger } from "../../src/common";
|
||||
import { NotificationLogger } from "../../src/common";
|
||||
|
||||
export function createMockLogger(): Logger {
|
||||
export function createMockLogger(): NotificationLogger {
|
||||
return {
|
||||
log: jest.fn(() => Promise.resolve()),
|
||||
show: jest.fn(),
|
||||
showErrorMessage: jest.fn(),
|
||||
showWarningMessage: jest.fn(),
|
||||
showInformationMessage: jest.fn(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user