fix: remove console.log statements, use console.debug where needed

Per Obsidian plugin submission requirements, only console.warn,
console.error, and console.debug are allowed.

Changes:
- Removed console.log from main.ts (API key generation and migration)
- Removed console.log from mcp-server.ts (server start/stop messages)
- Replaced console.log with console.debug in notifications.ts
- Updated tests to expect console.debug instead of console.log

All functionality is preserved - server status is still shown via
Notice and status bar, and tool calls are still logged when enabled.
This commit is contained in:
2025-11-07 11:16:34 -05:00
parent 2a7fce45af
commit dab456b44e
4 changed files with 3 additions and 7 deletions

View File

@@ -160,7 +160,7 @@ describe('NotificationManager', () => {
settings.logToConsole = true;
manager = new NotificationManager(app, settings);
const consoleSpy = jest.spyOn(console, 'log').mockImplementation();
const consoleSpy = jest.spyOn(console, 'debug').mockImplementation();
manager.showToolCall('read_note', { path: 'test.md' });
@@ -173,7 +173,7 @@ describe('NotificationManager', () => {
});
it('should not log to console when disabled', () => {
const consoleSpy = jest.spyOn(console, 'log').mockImplementation();
const consoleSpy = jest.spyOn(console, 'debug').mockImplementation();
manager.showToolCall('read_note', { path: 'test.md' });