Closed atztogo closed 2 years ago
I think the issue is that
logging.basicConfig(level=logging.DEBUG)
make the global root logger at the DEBUG level. So you get all DEBUG level logs from other packages that uses the root logger directly.
To properly enable DEBUG level logging for parsevasp (e.g. self._logger
), we should set its own logger and handler at DEBUG level.
To properly enable DEBUG level logging for parsevasp (e.g.
self._logger
), we should set its own logger and handler at DEBUG level.
I fully agree on this. We basically force all logging events that use the default logger to be on the DEBUG
level.
I have made a PR #104
Thanks @zhubonan and @espenfl. I have to learn more about logging. Thanks @zhubonan your PR, and your comment gave me motivation to start learning logging.
@atztogo Can you check how it is now with the recent update from PR #104?
It's fixed. Thanks.
Using parsevasp on ipython, I get noisy message when I push tab key, for example, as follows.
This can be quiet following logging setting (see https://github.com/ipython/ipython/issues/10946)
I think parsevasp doesn't assume to be used from ipython, but in fact, it is useful.
Watch the code, e.g.,
https://github.com/aiida-vasp/parsevasp/blob/573842a96dd3e25b1e8dc53838f3e7db988d356d/parsevasp/base.py#L46-L50
where when
logger
is not given, logger with DEBUG level is automatically set. But I think this is not appropriate setting, because DEBUG level is better to be set intentionally in my opinion.My question is how much parsevasp relies on this behaviour? Otherwise, I expect the default behaviour to be no logger setting.
Could anyone give me any comment?