configureForTest static method

void configureForTest({
  1. bool? enabled,
  2. String? path,
  3. String? runId,
  4. bool clear = false,
})

Enable/disable evidence logging for tests regardless of process env.

If enabled is null, the logger is enabled by default for the test.

Implementation

static void configureForTest({
  bool? enabled,
  String? path,
  String? runId,
  bool clear = false,
}) {
  _testOverride = true;
  _testEnabled = clear ? false : enabled;
  _testPath = clear ? null : path;
  _testRunId = clear ? null : runId;
  _resolved = false;
  close();
}