Skip to content

Commit

Permalink
Addressed review comments (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Jul 15, 2024
1 parent ebc2593 commit d955104
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ import { OutputChannelWithHistory } from './util/OutputChannelWithHistory';
const logger = new Logger('extension');

export function activate(context: vscode.ExtensionContext) {
logger.info(
'Congratulations, your extension "vscode-deephaven" is now active!'
);

let selectedConnectionUrl: string | null = null;
let selectedDhService: DhcService | null = null;
let connectionOptions = createConnectionOptions();
Expand All @@ -42,6 +38,10 @@ export function activate(context: vscode.ExtensionContext) {
Logger.addConsoleHandler();
Logger.addOutputChannelHandler(debugOutputChannel);

logger.info(
'Congratulations, your extension "vscode-deephaven" is now active!'
);

outputChannel.appendLine('Deephaven extension activated');

// Update connection options when configuration changes
Expand Down
12 changes: 6 additions & 6 deletions src/util/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export class Logger {
static addConsoleHandler = () => {
Logger.handlers.add({
/* eslint-disable no-console */
error: (label, ...args) => console.error(`[${label}] ERROR:`, ...args),
warn: (label, ...args) => console.warn(`[${label}] WARN:`, ...args),
info: (label, ...args) => console.info(`[${label}] INFO:`, ...args),
debug: (label, ...args) => console.debug(`[${label}] DEBUG:`, ...args),
debug2: (label, ...args) => console.debug(`[${label}] DEBUG2:`, ...args),
error: console.error.bind(console),
warn: console.warn.bind(console),
info: console.info.bind(console),
debug: console.debug.bind(console),
debug2: console.debug.bind(console),
/* eslint-enable no-console */
});
};
Expand All @@ -56,7 +56,7 @@ export class Logger {
});
};

constructor(private label: string) {}
constructor(private readonly label: string) {}

/**
* Handle log args for a given level
Expand Down

0 comments on commit d955104

Please sign in to comment.