goss icon indicating copy to clipboard operation
goss copied to clipboard

Unable to mute "Stale cache[res]: running tests" with loglevel

Open halberom opened this issue 1 year ago • 1 comments

Describe the bug Unable to mute "Stale cache[res]: running tests" log output irrespective of log level set. This is annoying because a container behind an ALB will flood logs unnecessarily.

p.s. the documentation in https://goss.readthedocs.io/en/stable/cli/ suggests that --loglevel is per command, but in actual fact it is at the global-level.

How To Reproduce

https://gist.github.com/halberom/2081e2652617a973af4db049a66f4d1f

Expected Behavior

Changing log level to WARN or at least ERROR should stop "Stale cache[res]: running tests" from being output.

Actual Behavior

I have to change the cache duration to 0, which is fine in my situation, but seems odd.

Environment:

  • Version of goss - tested with 0.4.8 and 0.4.9
  • OS/Distribution version (if applicable) - Python Docker container, and others.

halberom avatar Oct 21 '24 04:10 halberom

Thank you for the detailed explanation and extremely clear how to reproduce.

I've marked this issue as approved, anyone is free to submit a PR fixing this. If not, I'll try to get around to it sometime next week, I would think it's a simple one liner change.

aelsabbahy avatar Jan 18 '25 16:01 aelsabbahy