Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppressing log messages #39

Open
dzanaga opened this issue Jul 2, 2020 · 2 comments
Open

Suppressing log messages #39

dzanaga opened this issue Jul 2, 2020 · 2 comments

Comments

@dzanaga
Copy link

dzanaga commented Jul 2, 2020

Is there a way to suppress the log messages?

I am using richdem to perform calculations on a lot of small locations in a loop. As a result I get very verbose logs from richdem with a progress bar and the citation string. This is a bit annoying when I collect the logs and check them after large jobs on a cluster. Is there an option to turn of log messages from the C libs when using the python api? a sort of --verbose 0.

This is what I am using:

    rda = rd.rdarray(dem_arr, no_data=-9999)
    with HiddenPrints():
        attrs = [rd.TerrainAttribute(rda, attrib=attr) for attr in attributes]
    return attrs

HiddenPrints suppresses those from python already.

@parbelet
Copy link

parbelet commented Oct 1, 2021

That'd be great indeed!

@giswqs
Copy link

giswqs commented Oct 1, 2021

Try the ipywidgets Output widget to collect and hide logs

https://ipywidgets.readthedocs.io/en/latest/examples/Output%20Widget.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants