mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
Minor refactoring of VS Code companion extension code (#4761)
This commit is contained in:
18
packages/vscode-ide-companion/src/utils/logger.ts
Normal file
18
packages/vscode-ide-companion/src/utils/logger.ts
Normal 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);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user