Skip to content

Conversation

@albu-diku
Copy link
Contributor

@albu-diku albu-diku commented Sep 6, 2025

Recent changes to the linting checks have resulted in any changes in and around configuration fail in CI with the complaint that logger is not defined. In trying to understand what was happening it was found that some amount of confusion was occurring having both logger and logger_obj properties. Attempt to fix this by:

  1. unconditionally defining both properties
  2. always setting both properties
  3. determining the type of logger being assigned and set the internal
    properties as appropriate

Expanding on the latter, loggers are almost always set as assignment to .logger, but this was not always being passed the same kind of object. At times this was a bare logger (i.e. info(), .debug() etc) but sometimes it was something with .reopen() which would then simply be thrown away and thus reload() would not actually work. Fix this by detecting a .reopen() method and correctly referencing such an object.

Recent changes to the linting checks have resulted in any changes in and
around configuration fail in CI with the complaint that logger is not
defined.

In trying to understand what was happening it was found that some amount
of confusion was occurring having both logger and logger_obj properties.
Attempt to fix this by:
1) unconditionally defining both properties
2) always setting both properties
3) determining the type of logger being assigned and set the internal
   properties as appropriate

Expanding on the latter, loggers are almost always set as assignment to
.logger, but this was not always being passed the same kind of object. At
times this was a bare logger (i.e. info(), .debug() etc) but sometimes it
was something with .reopen() which would then simply be thrown away and
thus reload() would not actually work. Fix this by detecting a .reopen()
method and correctly referencing such an object.
@albu-diku
Copy link
Contributor Author

Attempted fix to #328.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants