mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove all usages of legacy global logger
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
1456e1e597
commit
ade0775061
107 files changed
+852
-606
No files matched your search
@@ -13,6 +13,7 @@ import terminalCopyOnSelectInjectable from "../../../../common/user-store/termin
|
||||
import isMacInjectable from "../../../../common/vars/is-mac.injectable";
|
||||
import openLinkInBrowserInjectable from "../../../../common/utils/open-link-in-browser.injectable";
|
||||
import xtermColorThemeInjectable from "../../../themes/terminal-colors.injectable";
|
||||
import loggerInjectable from "../../../../common/logger.injectable";
|
||||
|
||||
export type CreateTerminal = (tabId: TabId, api: TerminalApi) => Terminal;
|
||||
|
||||
@@ -26,6 +27,7 @@ const createTerminalInjectable = getInjectable({
|
||||
isMac: di.inject(isMacInjectable),
|
||||
openLinkInBrowser: di.inject(openLinkInBrowserInjectable),
|
||||
xtermColorTheme: di.inject(xtermColorThemeInjectable),
|
||||
logger: di.inject(loggerInjectable),
|
||||
};
|
||||
|
||||
return (tabId, api) => new Terminal(dependencies, { tabId, api });
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { TerminalApi } from "../../../api/terminal-api";
|
||||
import { disposer } from "../../../utils";
|
||||
import { once } from "lodash";
|
||||
import { clipboard } from "electron";
|
||||
import logger from "../../../../common/logger";
|
||||
import type { Logger } from "../../../../common/logger";
|
||||
import type { TerminalConfig } from "../../../../common/user-store/preferences-helpers";
|
||||
import assert from "assert";
|
||||
import { TerminalChannels } from "../../../../common/terminal/channels";
|
||||
@@ -26,6 +26,7 @@ export interface TerminalDependencies {
|
||||
readonly terminalCopyOnSelect: IComputedValue<boolean>;
|
||||
readonly isMac: boolean;
|
||||
readonly xtermColorTheme: IComputedValue<Record<string, string>>;
|
||||
readonly logger: Logger;
|
||||
openLinkInBrowser: OpenLinkInBrowser;
|
||||
}
|
||||
|
||||
@@ -199,14 +200,14 @@ export class Terminal {
|
||||
};
|
||||
|
||||
setFontSize = (fontSize: number) => {
|
||||
logger.info(`[TERMINAL]: set fontSize to ${fontSize}`);
|
||||
this.dependencies.logger.info(`[TERMINAL]: set fontSize to ${fontSize}`);
|
||||
|
||||
this.xterm.options.fontSize = fontSize;
|
||||
this.fit();
|
||||
};
|
||||
|
||||
setFontFamily = (fontFamily: string) => {
|
||||
logger.info(`[TERMINAL]: set fontFamily to ${fontFamily}`);
|
||||
this.dependencies.logger.info(`[TERMINAL]: set fontFamily to ${fontFamily}`);
|
||||
|
||||
this.xterm.options.fontFamily = fontFamily;
|
||||
this.fit();
|
||||
|
||||
Reference in new issue
Block a user