Skip to content

Commit

Permalink
Adjust log levels
Browse files Browse the repository at this point in the history
`error` should be logged when there is an issue that has to be
investigated. `warning` if there is something unexpected but
but that can also be triggered by something external. `info` is
to simplify trouble shooting.
  • Loading branch information
tsagadar committed Nov 10, 2024
1 parent 0f2512a commit 8f07f2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goosebit/updater/controller/v1/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def polling(request: Request, dev_id: str, updater: UpdateManager = Depend

elif device.last_state == UpdateStateEnum.ERROR and not device.force_update:
sleep = config.poll_time_default
logger.warning(f"Skip: device in error state, device={updater.dev_id}")
logger.info(f"Skip: device in error state, device={updater.dev_id}")

else:
# provide update if available. Note: this is also required while in state "running", otherwise swupdate
Expand Down Expand Up @@ -158,7 +158,7 @@ async def deployment_feedback(

logger.debug(f"Installation failed, software={reported_software.version}, device={updater.dev_id}")
else:
logging.warning(
logging.error(
f"Device reported unhandled execution state, state={data.status.execution}, device={updater.dev_id}"
)

Expand Down

0 comments on commit 8f07f2d

Please sign in to comment.