I ran the tests for the lexer (#6), and since each test invokes the run method of the lexer, which includes logger.info() calls, every test outputs log messages. These logs are highly useful in general, but they provide little value during test runs. When running multiple tests, they produce a flood of repetitive, “spam-like” messages. Given this, I think it would be useful to implement a mechanism to suppress log messages during test execution when needed.
Maybe Loguru comes with a built-in function you can call at the top of a file that turns off the logs.
Another way is to give a parameter to the lexer run method, e.g. verbosity. But I prefer a solution like the one above.
I ran the tests for the lexer (#6), and since each test invokes the
run
method of the lexer, which includeslogger.info()
calls, every test outputs log messages. These logs are highly useful in general, but they provide little value during test runs. When running multiple tests, they produce a flood of repetitive, “spam-like” messages. Given this, I think it would be useful to implement a mechanism to suppress log messages during test execution when needed.Maybe Loguru comes with a built-in function you can call at the top of a file that turns off the logs.
Another way is to give a parameter to the lexer run method, e.g.
verbosity
. But I prefer a solution like the one above.