laszukdawid / PyEMD

Python implementation of Empirical Mode Decompoisition (EMD) method
https://pyemd.readthedocs.io/
Apache License 2.0
867 stars 224 forks source link

how to shut down "INFO:PyEMD"? #10

Closed mfly2015 closed 7 years ago

mfly2015 commented 7 years ago

how to shut down "INFO:PyEMD"?

INFO:PyEMD.EMD:Standard deviation -- PASSED INFO:PyEMD.EMD:FINISHED -- RANGE INFO:PyEMD.EMD:Standard deviation -- PASSED

laszukdawid commented 7 years ago

You would have to set logger to the level you wish, i.e. at least one above you don't want to see. The hierarchy is: CRITICAL > ERROR > WARNING > INFO > DEBUG. So if you don't want to see INFO, but still want to see warnings, errors and critials then set it to WARNING. Example:

from PyEMD import EMD
import logging

emd = EMD()
emd.logger.setLevel(logging.WARNING) # Changes logging to warning level
laszukdawid commented 7 years ago

Do you find these messages not helpful? Do you use EMD in some pipeline and want to have console clear? I'm thinking whether these should be hidden by default and your use case could help me decide.

mfly2015 commented 7 years ago

Thank you for your help. I use it to deal with financial time series, such as price. I have much concerned about decomposed series than these messages.

laszukdawid commented 7 years ago

Ok, I'll consider some more optimizations in following releases. Thanks and hope it helps!