Skip to content

Use the logging module instead of print#9

Merged
jzh18 merged 1 commit into
mainfrom
chore/logging-instead-of-print
Jun 12, 2026
Merged

Use the logging module instead of print#9
jzh18 merged 1 commit into
mainfrom
chore/logging-instead-of-print

Conversation

@jzh18

@jzh18 jzh18 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Every module gets a logger = logging.getLogger(name); the 22 print() call sites become logger.info (progress: boundary-detection method announcements, pid/tid processing, call-log counts) or logger.warning (libtorch_cuda skip, missing module logs, on-the-fly disassembly, function insert/remove anomalies), with the manual "Warning:" prefixes dropped in favor of the level.

logging.basicConfig lives only in the entry points (main.py:main and the postprocess main block) so library consumers keep control of logging configuration. Diagnostics consequently move from stdout to stderr; the JSON/CSV artifacts are unchanged. The deliberate edition-gating message in edition.py (sys.exit) is untouched.

Every module gets a logger = logging.getLogger(__name__); the 22
print() call sites become logger.info (progress: boundary-detection
method announcements, pid/tid processing, call-log counts) or
logger.warning (libtorch_cuda skip, missing module logs, on-the-fly
disassembly, function insert/remove anomalies), with the manual
"Warning:" prefixes dropped in favor of the level.

logging.basicConfig lives only in the entry points (main.py:main and
the postprocess __main__ block) so library consumers keep control of
logging configuration. Diagnostics consequently move from stdout to
stderr; the JSON/CSV artifacts are unchanged. The deliberate
edition-gating message in edition.py (sys.exit) is untouched.
@jzh18 jzh18 merged commit 0a28120 into main Jun 12, 2026
2 checks passed
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