pysteps icon indicating copy to clipboard operation
pysteps copied to clipboard

Use logging instead of print

Open fox91 opened this issue 5 years ago • 4 comments

Are you interested in migrating all log messages from the simple print to the more standard logging module?

Given the high number of logs that the outputs are written I think it may be useful to many to have a common method to manage them.

Let me know if you want my contribution to introduce the use of the logging module in this fantastic framework!

fox91 avatar Feb 20 '20 10:02 fox91

Hi Andrea, welcome to pysteps!

This is an excellent proposition and certainly very appropriated considering the stage at which the package is now. I'm in favor of such development, let's see if anyone else has a strong opinion about that. Perhaps @pulkkins, @aperezhortal or @cvelascof ?

I'm also happy to contribute, in case we decide to take this idea forward. Perhaps it would be interesting if you, @fox91, could prepare a brief example or proposition of how we could use logging within pysteps? This way, we could better assess the work needed for a full implementation.

dnerini avatar Feb 20 '20 12:02 dnerini

Hi Andrea, I really like the idea! With the logging module with can have fine control of the logging output. Perhaps we can start the logging implementation one module at a time.

aperezhortal avatar Feb 20 '20 12:02 aperezhortal

Hi Daniele and Andres, I can make a PR in the next days implementing the logging module in the pysteps.nowcasts module that I'm currently using. After that we can implement it in the others and, when all the modules are updated, we can merge the PR everything at once.

fox91 avatar Feb 20 '20 14:02 fox91

Sounds excellent!

dnerini avatar Feb 20 '20 15:02 dnerini