Skip to content

Add vm-tracing-logging feature#4200

Open
jopemachine wants to merge 2 commits into
RustPython:mainfrom
jopemachine:add-vm-tracing-logging-feature
Open

Add vm-tracing-logging feature#4200
jopemachine wants to merge 2 commits into
RustPython:mainfrom
jopemachine:add-vm-tracing-logging-feature

Conversation

@jopemachine
Copy link
Copy Markdown
Contributor

@jopemachine jopemachine commented Oct 4, 2022

  • This PR set env_logger's log level to trace when "vm-tracing-logging" feature is enabled.
  • This PR enables to pass the "vm-tracing-logging" feature when to build rustpython like below command to trace detail of rustpython-vm
cargo run --features "vm-tracing-logging"

@youknowone youknowone added the z-ca-2022 Tag to track contrubution-academy 2022 label Oct 15, 2022
Comment thread src/lib.rs
/// based on the return code of the python code ran through the cli.
pub fn run(init: impl FnOnce(&mut VirtualMachine) + 'static) -> ExitCode {
env_logger::init();
if cfg!(feature = "vm-tracing-logging") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

isn't this typically done with some ENV var instead of a feature? I'm legitimately curious here since I'm not sure but it feels as if a feature is a big of a heavy handed approach to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

z-ca-2022 Tag to track contrubution-academy 2022

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants