community icon indicating copy to clipboard operation
community copied to clipboard

Initialize logger if no log_dir is configured during log purge

Open craigkai opened this issue 2 years ago • 3 comments

The logger can end up not being _configured if this is not called. This can occure when log level is set to a stricter level like error and no errors occur, then when we call the purge_logs function our handler could be un-configured and not have a log_dir attribute -- resulting in the function bailing out.

Maintainer merge checklist

  • [ ] Title is descriptive/clear for inclusion in release notes.
  • [ ] Applied a Component: xxx label.
  • [ ] Applied the api-deprecation or api-break label.
  • [ ] Applied the release-highlight label to be highlighted in release notes.
  • [ ] Added to the milestone version it was merged into.
  • [ ] Unittests are included in PR.
  • [ ] Properly documented, including versionadded, versionchanged as needed.

craigkai avatar Feb 13 '23 22:02 craigkai

Hi @craigkai !

Sorry for the late reply, but we were really busy with the new release process.

How do you feel about adding a test that exercises this issue so we can ensure that does not happen again in the future?

misl6 avatar Jun 04 '23 08:06 misl6

I'll see what I can do!

craigkai avatar Jun 06 '23 14:06 craigkai

Ping @craigkai !

misl6 avatar Oct 29 '23 15:10 misl6