Description
Two files in core/framework/host/ use print() in their docstring
Usage/Example sections, inconsistent with the framework's logging conventions.
Location
core/framework/host/agent_host.py line 119 — Usage example uses print()
core/framework/host/event_bus.py line 242 — Example block uses print()
Expected Behavior
Docstring examples should model correct logging patterns using logger.info(),
consistent with the fix applied in #4783 and #7152.
Proposed Fix
Replace print() with logger.info() in both docstring examples and add
import logging + logger = logging.getLogger(__name__) so examples are
copy-paste ready.
Why This Matters
Docstring examples are reference implementations for developers. Using print()
teaches bad habits and is inconsistent with the rest of the framework.
Description
Two files in
core/framework/host/useprint()in their docstringUsage/Example sections, inconsistent with the framework's logging conventions.
Location
core/framework/host/agent_host.pyline 119 — Usage example usesprint()core/framework/host/event_bus.pyline 242 — Example block usesprint()Expected Behavior
Docstring examples should model correct logging patterns using
logger.info(),consistent with the fix applied in #4783 and #7152.
Proposed Fix
Replace
print()withlogger.info()in both docstring examples and addimport logging+logger = logging.getLogger(__name__)so examples arecopy-paste ready.
Why This Matters
Docstring examples are reference implementations for developers. Using
print()teaches bad habits and is inconsistent with the rest of the framework.