sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Fix issue always logging about NSM during maneuver #277

Closed taldcroft closed 1 year ago

taldcroft commented 1 year ago

Description

Fix the problem in #276 by adding a keyword arg to the debug function to specify the logging level. In most cases a warning is appropriate (the default) but this particular situation is just informational.

Fixes #276

Interface impacts

Testing

Unit tests

Independent check of unit tests by Jean

Functional tests

Before the patch this code would generate the informational output shown in #276 (circa 2023:048):

cmds = get_cmds(CxoTime.now())

After the patch this runs quietly. I also confirmed that with the patch if the kadi.logger is set to "INFO" log level then the expected INFO output appears.

taldcroft commented 1 year ago

Ping @jeanconn. It would be good to get this into ska3-prime as it causes noise in cron jobs.

jeanconn commented 1 year ago

On this, sorry, I got side-tracked by what looks like an unrelated test fail when running on linux

FAILED kadi/commands/tests/test_commands.py::test_commands_create_archive_regress[2] - AssertionError: assert False

I couldn't remember what the state was of the archive regress (do we need new data installed on head?).