Skip to content

Commit

Permalink
Move HWP encoder timeout packet log to debug level (#684)
Browse files Browse the repository at this point in the history
* Move timeout packet log to debug level

* Setup agent to set loglevel based on env var
  • Loading branch information
BrianJKoopman authored May 30, 2024
1 parent dcdcd21 commit 9583d96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion socs/agents/hwp_encoder/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

import argparse
import calendar
import os
import select
import socket
import struct
Expand Down Expand Up @@ -365,7 +366,8 @@ def grab_and_parse_data(self):
# Clear self.data
self.data = ''
elif header == 0x1234:
self.log.error('Received timeout packet.')
# Expected behavior when HWP is not spinning
self.log.debug('Received timeout packet.')
# Clear self.data
self.data = ''
else:
Expand Down Expand Up @@ -699,6 +701,9 @@ def make_parser(parser=None):

# Portion of the code that runs
def main(args=None):
# Start logging
txaio.start_logging(level=os.environ.get("LOGLEVEL", "info"))

parser = make_parser()
args = site_config.parse_args(agent_class='HWPBBBAgent',
parser=parser,
Expand Down

0 comments on commit 9583d96

Please sign in to comment.