veracruz icon indicating copy to clipboard operation
veracruz copied to clipboard

Replace `println!` with log functions (`info!`, `warn!`, etc)

Open gbryant-arm opened this issue 2 years ago • 3 comments

Requested feature Replace println! with log functions (info!, warn!, etc). Use debug! for dumping debugging material, e.g. in https://github.com/veracruz-project/veracruz/blob/main/runtime-manager/src/platforms/linux.rs#L261

Motivation println! is still used extensively, especially in the Runtime Manager. This degrades performance and is potentially dangerous

gbryant-arm avatar Aug 09 '22 13:08 gbryant-arm

@gbryant-arm how's the status on this? I think it's complete, but can't be sure

dreemkiller avatar Jun 21 '23 01:06 dreemkiller

When running VOD with log level set to info, I'm getting a log over 15K lines. I'd suggest we replace info! with debug! or trace! for most debug messages that keep showing up. Cf. tls_data() and read_tls_data() in veracruz-server/src/platforms/linux.rs

gbryant-arm avatar Jun 21 '23 11:06 gbryant-arm

I only see 3 places left:

  • https://github.com/veracruz-project/veracruz/blob/d872ec8032df7cd75ee14acecf7f71d34f90ad2d/nitro-runtime-manager/src/nitro_runtime.rs#L31
  • https://github.com/veracruz-project/veracruz/blob/d872ec8032df7cd75ee14acecf7f71d34f90ad2d/runtime-manager/src/managers/mod.rs#L276
  • https://github.com/veracruz-project/veracruz/blob/d872ec8032df7cd75ee14acecf7f71d34f90ad2d/runtime-manager/src/managers/mod.rs#L279

The last two seem to be essentially dead code.

mathias-arm avatar Jul 28 '23 17:07 mathias-arm