Skip to content

Commit 42a9eba

Browse files
authored
Add Timestamp to Copilot Logging (#13570)
To correlate with the other log files for better troubleshooting experience.
1 parent 48c961a commit 42a9eba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Extension/src/LanguageServer/copilotCompletionContextProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ response.uri:${copilotCompletionContext.sourceFileUri || "<not-set>"}:${copilotC
194194
return undefined;
195195
} finally {
196196
this.logger.
197-
appendLineAtLevel(7, logMessage);
197+
appendLineAtLevel(7, `[${new Date().toISOString().replace('T', ' ').replace('Z', '')}] ${logMessage}`);
198198
telemetry.send("cache");
199199
}
200200
}
@@ -414,7 +414,7 @@ response.uri:${copilotCompletionContext.sourceFileUri || "<not-set>"}:${copilotC
414414
telemetry.addResolvedElapsed(duration);
415415
telemetry.addCacheSize(this.completionContextCache.size);
416416
telemetry.send();
417-
this.logger.appendLineAtLevel(7, logMessage);
417+
this.logger.appendLineAtLevel(7, `[${new Date().toISOString().replace('T', ' ').replace('Z', '')}] ${logMessage}`);
418418
}
419419
}
420420

0 commit comments

Comments
 (0)