Skip to content

Conversation

@QuantumFlowQa
Copy link
Collaborator

Summary

  • refactor logging setup to accept a debug flag instead of parsing args on import
  • parse CLI debug flag in main.py
  • document debug mode in README

Testing

  • ruff check .
  • pytest (fails: ROM file not found)

https://chatgpt.com/codex/tasks/task_e_68b07667ce54832e92ec707785da1f21

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 26 to 31
datefmt="%Y-%m-%d %H:%M:%S",
)

logger: logging.Logger = logging.getLogger("C64Emulator")
logger.info("Logging configured")

return logger

log.setLevel(level)
log.info("Logging configured")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Configure logging in multiprocessing child processes

Removing the module‑level setup_logging() call means the logger is never configured when a new process starts. On platforms where multiprocessing uses the spawn start method (e.g. Windows), the bus worker process imports log_setup but never executes main(), so setup_logging(debug=…) is never invoked. As a result, all log.info/log.debug calls in the bus process (for example in Bus.__init__) run with the default WARNING level and no handlers, so the newly added --debug flag does not emit any logs from the core emulator. Consider configuring logging inside each process or restoring an import‑time initialization so child processes honour the debug flag.

Useful? React with 👍 / 👎.

@QuantumFlowQa QuantumFlowQa merged commit 6c51491 into main Aug 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants