Skip to content

fix: replace raw print() with logging in on_startup() - #70

Merged
samuk merged 1 commit into
Agroecology-Lab:caatinga-devfrom
zain-cs:fix/replace-print-with-logging-v2
Jun 22, 2026
Merged

samuk merged 1 commit into
Agroecology-Lab:caatinga-devfrom
zain-cs:fix/replace-print-with-logging-v2

Conversation

@zain-cs

@zain-cs zain-cs commented Jun 22, 2026

Copy link
Copy Markdown

Fixes #67

Changes

  • Added import logging to imports
  • Replaced raw print() calls in on_startup() with Python stdlib logging
  • Configured logging.basicConfig() with INFO level and standard format
  • Used log.critical() for the fatal config-not-found message
  • Used log.info() for the config loading message

Why

Raw print() calls in on_startup() can get buffered or dropped under
ros2 launch / systemd / Docker. Using the logging module ensures proper
log levels, timestamps, and consistent formatting.

@zain-cs

zain-cs commented Jun 22, 2026

Copy link
Copy Markdown
Author

Hi! This is a straightforward fix replacing raw print() calls with
Python's logging module as described in issue #67. Happy to make any
changes if needed. Thanks for your time!

@samuk
samuk merged commit 32b1d72 into Agroecology-Lab:caatinga-dev Jun 22, 2026
@samuk

samuk commented Jun 22, 2026

Copy link
Copy Markdown

Great stuff, thanks!

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.

Replace raw print() with proper logging in devkit_driver_node.py

2 participants