Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 17, 2025

Fix Unnecessary Log Entries (INFO Level) ✅

This PR addresses issue #235 where version 1.5.1 of the adapter produces frequent unnecessary log entries at INFO level with content like:
1 Values updated: {"deviceInfo":0,"modelInfo":0,"control":0,"controlInfo":0,"sensorInfo":1,"demandControl":0}

Changes Made:

  • Identify the problematic log line in daikin.js at line 646
  • Change the log level from info to debug for the update notification
  • Test the change to ensure it still works correctly
  • Verify that existing functionality is preserved
  • Validate that all existing tests still pass
  • Confirm code style compliance with linting
  • Complete implementation and testing
  • Add changelog entry in README under WORK IN PROGRESS

Technical Details:
The change is minimal and surgical - only one line was modified in daikin.js:

// Before (line 646):
adapter.log.info(`${updatedTotal} Values updated: ${JSON.stringify(updated)}`);

// After:
adapter.log.debug(`${updatedTotal} Values updated: ${JSON.stringify(updated)}`);

This resolves the issue by moving the frequent update notifications from INFO level (which users see by default) to DEBUG level (which is only visible when debugging is enabled).

Impact:

  • ✅ Reduces log spam for users running at INFO level
  • ✅ Preserves debugging information when needed (debug level)
  • ✅ No functional changes to adapter behavior
  • ✅ Maintains backward compatibility

Testing:

  • ✅ All existing tests pass (4/4 tests passing)
  • ✅ Linting passes with no errors
  • ✅ Created verification test to confirm log level behavior
  • ✅ No functional changes - only log level modification

The fix is now complete and ready for deployment.

Fixes #235.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Unnecessary log entries (INFO) Fix: Change unnecessary log entries from info to debug level Sep 17, 2025
@Copilot Copilot AI requested a review from Apollon77 September 17, 2025 10:57
Copilot finished work on behalf of Apollon77 September 17, 2025 10:57
Copy link
Owner

@Apollon77 Apollon77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Please add a changelog entry in the Readme under WORK IN PROGRESS

Copy link
Contributor Author

Copilot AI commented Sep 17, 2025

@copilot Please add a changelog entry in the Readme under WORK IN PROGRESS

Added changelog entry under WORK IN PROGRESS section. Commit dda435b addresses the log level change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary log entries (INFO)
2 participants