Skip to content

fix(runner): replace print statements with logger.warning [micro-fix]#3441

Open
Akshat050 wants to merge 2 commits intoadenhq:mainfrom
Akshat050:fix/use-logger-instead-of-print
Open

fix(runner): replace print statements with logger.warning [micro-fix]#3441
Akshat050 wants to merge 2 commits intoadenhq:mainfrom
Akshat050:fix/use-logger-instead-of-print

Conversation

@Akshat050
Copy link

Summary

Replace print() statements with logger.warning() in AgentRunner._setup() for consistent logging behavior.

Problem

The file core/framework/runner/runner.py has a logger configured on line 27:

logger = logging.getLogger(__name__)

And uses it correctly in some places (lines 430, 432), but uses print() for warnings in other places (lines 480-493). This is inconsistent.

Changes

Replace 4 print() calls with logger.warning():

  • Line 480: Claude Code token warning
  • Line 481: Authentication instruction
  • Line 492: API key not set warning
  • Line 493: Export instruction

Why

  • Consistent logging behavior throughout the file
  • Warnings can be properly configured via logging system
  • Better for production use (log levels, formatters, handlers)

Akshat Bhatt added 2 commits February 3, 2026 13:37
Use the existing logger instead of print() for warning messages
in AgentRunner._setup(). This ensures consistent logging behavior
and allows warning messages to be properly configured via the
logging system.

Changes:
- Replace 4 print() calls with logger.warning() in runner.py
- Logger was already configured but not used for these warnings
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.

1 participant