Skip to content

Conversation

@BrianJKoopman
Copy link
Member

Description

This PR changes the log level of the 'Received timeout packet.' message in the HWP Encoder agent from 'error' to 'debug'. If the HWP is not spinning, this packet is expected as normal behavior.

I also add the setup that allows changing the log level via environment variable, so it can be changed in the Docker Compose config.

Motivation and Context

When the HWP is not spinning, this packet is received every 10 seconds, filling the logs with this message. This makes it difficult to see any other messages that might be more relevant for debugging.

How Has This Been Tested?

Not yet tested, though is a straightforward change. The log level selection is used in other agents.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@BrianJKoopman BrianJKoopman requested a review from ykyohei May 30, 2024 15:10
Copy link
Contributor

@ykyohei ykyohei left a comment

Choose a reason for hiding this comment

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

This is okay, but can you explain exactly how we can change the log level through the Docker Compose config?

@BrianJKoopman
Copy link
Member Author

This is okay, but can you explain exactly how we can change the log level through the Docker Compose config?

Yes, if you add this line to the environment block:

environment:
  - "LOGLEVEL=debug"

Also described here, for future reference: https://ocs.readthedocs.io/en/main/developer/agent_references/logging.html

@BrianJKoopman BrianJKoopman merged commit 9583d96 into main May 30, 2024
@BrianJKoopman BrianJKoopman deleted the koopman/hwp-encoder-logs branch May 30, 2024 16:59
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.

2 participants