You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Logging to the console causes duplicate messages in e.g. CI test logs.
Solution:
Only log to the console in the Browser, not Node.js
Signed-off-by: nkomonen <[email protected]>
Copy file name to clipboardExpand all lines: src/shared/logger/activation.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ export async function activate(
43
43
{
44
44
logPaths: [logUri.fsPath],
45
45
outputChannels: [chan],
46
-
useConsoleLog: true,
46
+
useConsoleLog: isInBrowser(),
47
47
},
48
48
extensionContext.subscriptions
49
49
)
@@ -100,7 +100,8 @@ export async function activate(
100
100
* @param opts.staticLogLevel Static log level, overriding config value. Will persist overridden config value even if the config value changes.
101
101
* @param opts.logPaths Array of paths to output log entries to
102
102
* @param opts.outputChannels Array of output channels to log entries to
103
-
* @param opts.useDebugConsole If true, outputs log entries to currently-active debug console. As per VS Code API, cannot specify a debug console in particular.
103
+
* @param opts.useDebugConsole If true, outputs log entries to `vscode.debug.activeDebugConsole`
104
+
* @param opts.useConsoleLog If true, outputs log entries to the nodejs or browser devtools console.
104
105
* @param disposables Array of disposables to add a subscription to
0 commit comments