Minor refactoring of VS Code companion extension code (#4761)

This commit is contained in:
Shreya Keshive
2025-07-24 01:32:55 -04:00
committed by GitHub
parent b1e0fb157b
commit 6380bfe35c
8 changed files with 244 additions and 115 deletions

View File

@@ -0,0 +1,18 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as vscode from 'vscode';
export function createLogger(
context: vscode.ExtensionContext,
logger: vscode.OutputChannel,
) {
return (message: string) => {
if (context.extensionMode === vscode.ExtensionMode.Development) {
logger.appendLine(message);
}
};
}