Skip to content

Name every logger after its module - #101

Merged
bencehezso merged 1 commit into
release/2.0from
task/cli2_logger_names
Oct 24, 2026
Merged

bencehezso merged 1 commit into
release/2.0from
task/cli2_logger_names

Conversation

@bencehezso

Copy link
Copy Markdown
Contributor

Summary

Logger names were written by hand and still referred to modules that no longer exist (core.engine.*, main.utils.*). Every module now uses logging.getLogger(__name__), so the logger name is the module's import path.

Changes

Source

  • 28 modules switch from a hand-written logger name to __name__.

Tests

  • Log-capturing tests use the new names, or a parent logger where several modules used to share one name.
  • A new test fails if a module logger is not named after its module, and checks that run.log shows the module that wrote each line.

Compatibility

User-visible: the logger name column in run.log and in -v/-vv output changes from, for example, core.engine.api_v2 to cloudexit.platform.client. Log levels, log messages, behaviour, the command line, exit codes, report output and the API v2 copy are unchanged.

@bencehezso bencehezso self-assigned this Oct 24, 2026
@bencehezso bencehezso added the enhancement New feature or request label Oct 24, 2026
@bencehezso
bencehezso merged commit 26c6cc6 into release/2.0 Oct 24, 2026
11 checks passed
@bencehezso
bencehezso deleted the task/cli2_logger_names branch October 24, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant