microsoft / vscode-jupyter-hub

Jupyter Hub Support in VS Code
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub
MIT License
9 stars 7 forks source link

traceDebug doesn't work #69

Closed hiroyuki-sato closed 1 month ago

hiroyuki-sato commented 1 month ago

Hello, Team.

Environment data

Expected behavior

Output a message like this

11:55:58.254 [debug] Getting user info for user https://www.example.com/, token length = 32 && 32
11:55:58.344 [debug] Getting user info for user https://www.example.com/, token length = 32 && 32
11:55:58.382 [debug] Getting user info for user https://www.example.com/, token length = 32 && 32
11:55:58.413 [debug] Getting user info for user https://www.example.com/, token length = 32 && 32
11:55:58.520 [debug] Getting user info for user https://www.example.com/, token length = 32 && 32

Actual behavior

11:55:58.254 [debug]
11:55:58.344 [debug]
11:55:58.382 [debug]
11:55:58.413 [debug]
11:55:58.520 [debug]

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. set log level to debug
{
    "jupyterhub.log": "debug"
}

Logs

11:44:31.882 [debug]
11:44:32.006 [debug]
11:44:32.050 [debug]
11:44:32.092 [debug]
11:44:32.234 [debug]

Proposed Change

This change outputs expected logs.

https://github.com/microsoft/vscode-jupyter-hub/blob/ab6d3eabfa56440c24dbfafbcd43d660e537b563/src/common/logging.ts#L40

diff --git a/src/common/logging.ts b/src/common/logging.ts
index f781d47..b1f1eb9 100644
--- a/src/common/logging.ts
+++ b/src/common/logging.ts
@@ -37,7 +37,7 @@ export function traceError(..._args: unknown[]): void {
     logMessage('error', ..._args);
 }

-export function traceDebug(_message: string, ..._args: unknown[]): void {
+export function traceDebug(..._args: unknown[]): void {
     if (loggingLevel !== 'debug') {
         return;
     }
hiroyuki-sato commented 1 month ago

@DonJayamanne Thank you for your support!