Skip to content

Commit

Permalink
Update OutputWindow.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn2223 committed Oct 16, 2024
1 parent 3b1146c commit a97a09c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/VsCode/OutputWindow.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import {
OutputChannel,
window
} from "vscode";
import { OutputChannel, window } from "vscode";
import { SettingsHelper } from "../Helpers/SettingsHelper";
import { OutputLevel } from "../Enums/OutputLevel";


export class OutputWindow {
private static _msgChannel: OutputChannel;

Expand All @@ -26,24 +22,29 @@ export class OutputWindow {
): void {
const userLogLevel = SettingsHelper.getOutputLogLevel();

if (outputLevel >= userLogLevel ||
outputLevel === OutputLevel.Critical) {
if (
outputLevel >= userLogLevel ||
outputLevel === OutputLevel.Critical
) {
OutputWindow.MsgChannel.show(true);
}

if (outputLevel >= userLogLevel || outputLevel > OutputLevel.Debug) {
if (msgHeadline) {
OutputWindow.MsgChannel.appendLine(msgHeadline);
console.log(msgHeadline);
}

if (msgBody) {
msgBody.forEach((msg) => {
OutputWindow.MsgChannel.appendLine(msg);
console.log(msg);
});
}

if (addEndLine) {
OutputWindow.MsgChannel.appendLine("--------------------");
console.log("--------------------");
}
}
}
Expand Down

0 comments on commit a97a09c

Please sign in to comment.