How to disable logging for a test stack?

White prints a lot of logs to the console, and I want to disable it to see my output. How is this possible? I tried below, but still see the logs. Is there more code to add?

void func() { CoreAppXmlConfiguration.Instance.LoggerFactory = new WhiteDefaultLoggerFactory(LoggerLevel.Off); // Open application and perform actions... } 
+5
source share
2 answers

Now the above code works.

+2
source

Try using ConsoleFactory instead of WhiteDefaultLoggerFactory.

 CoreAppXmlConfiguration.Instance.LoggerFactory = new ConsoleFactory(LoggerLevel.Error) 
0
source

All Articles