Skip to content

DevEx: fix test_logger #9107

@michaelsproul

Description

@michaelsproul

Description

At the moment to get logs in tests requires recompiling with --features logging/test_logger. This is a bit of a waste of time. The test logger also outputs logs to stderr, which evades the Rust test-runner's log capturing (and I think nextest as well).

Perhaps a better solution would be to:

  • Always log to stdout when the logger is set to test_logger (which is the case in all tests)
  • If necessary, configure aspects of the test_logger via environment variables so no re-compilation is necessary.

This would allow us to run the whole test suite, and then individual tests with --nocapture without recompiling. This might be useful for AI agents wanting to iterate faster as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions