Open florianjehn opened 4 years ago
A good idea would be to include a verbose
keyword-argument here:
which is True
by default, so everything will work as usual.
Then every print
statement has to be hunt down and should be equipped with:
if self.verbose:
print(statement)
My two cents. Cheers, Sebastian
Better solution in my opinion: Search for all print functions and exchange them with logging.info
, logging.warning
, logging.error
and logging.debug
, depending on the importance of the message. That is the way how libraries like spotpy
should communicate with the user. I wish we knew about this, when we started. The user can then change the logging level with logging.basicConfig
. See: https://docs.python.org/3/library/logging.html
I opened a pull request #244 and hope it could help to solve this issue.
Spotpy prints out a lot of things each time you create a new sampler and run it. This is useful if you want to run one model several times, however it slows down things considerably when you want to run a lot of models after another. It would be useful if you could provide spotpy with keywords that silences this output.