fix: replace print() statements with proper logging across codebase#1053
Merged
VinciGit00 merged 1 commit intoScrapeGraphAI:mainfrom Mar 24, 2026
Merged
Conversation
Library code should never write directly to stdout. Migrated all 13 print() calls to use the existing get_logger() infrastructure with appropriate log levels (debug/info/warning).
|
🎉 This PR is included in version 1.75.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Replaces all raw
print()statements in library code with proper logging via the existingget_logger()fromscrapegraphai/utils/logging.py.Users can now control output verbosity with standard
logging.basicConfig(level=...).Why?
A library should not dump output to stdout via
print(). Users have no way to silence, filter, or redirect it. The promotionalmessage in
base_graph.pyprinted on everyexecute()call with no opt-out.Changes
utils/data_export.pyinfo, 1×warningutils/screenshot_scraping/screenshot_preparation.pydebuggraphs/speech_graph.pyinfointegrations/burr_bridge.pydebuggraphs/abstract_graph.pyinfo, 1×warninggraphs/base_graph.pyinfoLog levels
debug— dev artifacts, burr action tracinginfo— export confirmations, graph results, promotional messagewarning— missing token config fallback, empty data export