Skip to content

Commit 2d463c6

Browse files
🧹 Replace console.warn with proper logging for Undo/Redo failures
This updates the `undo` and `redo` handlers in `DatabaseDocument` to log their 'No entry found' failures to the `GlobalOutputChannel` rather than outputting raw `console.warn` statements. This ensures consistent logging behavior in the extension and removes raw console writes that can clutter VS Code's developer tools.
1 parent 776ed72 commit 2d463c6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/databaseModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export class DatabaseDocument extends Disposable implements vsc.CustomDocument {
269269
undo: async () => {
270270
const undoneEntry = tracker.stepBack();
271271
if (!undoneEntry) {
272-
console.warn('[Undo] No entry found in tracker');
272+
GlobalOutputChannel?.appendLine('[Undo] No entry found in tracker');
273273
return;
274274
}
275275
try {
@@ -284,7 +284,7 @@ export class DatabaseDocument extends Disposable implements vsc.CustomDocument {
284284
redo: async () => {
285285
const redoneEntry = tracker.stepForward();
286286
if (!redoneEntry) {
287-
console.warn('[Redo] No entry found in tracker');
287+
GlobalOutputChannel?.appendLine('[Redo] No entry found in tracker');
288288
return;
289289
}
290290
try {

0 commit comments

Comments
 (0)