Files
vscode/extensions/markdown-language-features/src/logging.ts
T
Henning DieterichsandCopilot 4470c4eb32 Enforce stable link presentation provider kinds (#332519)
* Enforce stable link presentation provider kinds

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5

* Fix link presentation CI failures

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5

* Register GitHub contribution for localization

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5

* Remove Markdown GitHub link presentations

Keep GitHub repository, issue, and pull request presentations in core only. Address review feedback around provider re-registration, cache kind validation, check statuses, fixture kinds, and optional repository fields.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5

* Fix default account event test type

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5

* Fix default account type import

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0d714f-06c2-4399-83ba-5016fae514f5
2026-08-26 01:00:25 +00:00

36 lines
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import { Disposable } from './util/dispose';
export interface ILogger {
trace(title: string, message: string, data?: unknown): void;
}
export class VsCodeOutputLogger extends Disposable implements ILogger {
#outputChannelValue?: vscode.LogOutputChannel;
get #outputChannel() {
this.#outputChannelValue ??= this._register(vscode.window.createOutputChannel('Markdown', { log: true }));
return this.#outputChannelValue;
}
constructor() {
super();
}
public trace(title: string, message: string, data?: unknown): void {
if (!this.#outputChannelValue && vscode.env.logLevel !== vscode.LogLevel.Trace) {
return;
}
const outputChannel = this.#outputChannel;
if (outputChannel.logLevel === vscode.LogLevel.Trace) {
outputChannel.trace(`${title}: ${message}`, ...(data ? [JSON.stringify(data, null, 4)] : []));
}
}
}