Skip to content

Clarify LoggerMixin usage in docstrings#3147

Merged
jonathangreen merged 2 commits intomainfrom
chore/update-logger-mixin-docstrings
Mar 17, 2026
Merged

Clarify LoggerMixin usage in docstrings#3147
jonathangreen merged 2 commits intomainfrom
chore/update-logger-mixin-docstrings

Conversation

@jonathangreen
Copy link
Member

Description

Updates the LoggerMixin docstrings to clarify the intended usage pattern:

  • self.log is the preferred way to access the logger from instance methods
  • cls.logger() should only be used in classmethods or static contexts where self is unavailable

Motivation and Context

The existing docstrings didn't make it clear which accessor to prefer, leading to inconsistent usage across the codebase.

How Has This Been Tested?

Docstring-only change, no behavioral changes.

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Document that self.log is the preferred way to access the logger from
instance methods, and cls.logger() should only be used in classmethods
or static contexts where self is unavailable.
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (60760e8) to head (e6ed8e8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3147   +/-   ##
=======================================
  Coverage   93.26%   93.26%           
=======================================
  Files         493      493           
  Lines       45579    45579           
  Branches     6252     6252           
=======================================
  Hits        42511    42511           
  Misses       1982     1982           
  Partials     1086     1086           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗒️

@jonathangreen jonathangreen merged commit 64ba994 into main Mar 17, 2026
20 checks passed
@jonathangreen jonathangreen deleted the chore/update-logger-mixin-docstrings branch March 17, 2026 21:25
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